1 21 22 package nu.xom.samples; 23 24 import nu.xom.Builder; 25 import nu.xom.Document; 26 import nu.xom.canonical.Canonicalizer; 27 28 37 public class CanonicalizerDriver { 38 39 47 public static void main(String [] args) { 48 49 if (args.length == 0) { 50 System.out.println( 51 "Usage: java nu.xom.samples.CanonicalizerDriver URL" 52 ); 53 return; 54 } 55 56 Builder builder = new Builder(); 57 try { 58 Canonicalizer outputter = new Canonicalizer(System.out); 59 Document input = builder.build(args[0]); 60 outputter.write(input); 61 } 62 catch (Exception ex) { 63 System.err.println(ex); 64 ex.printStackTrace(); 65 } 66 67 } 68 69 } 70 | Popular Tags |