public static int sMain (string [] args) { if (args.Length < 1) { Console.WriteLine ("Usage: monodoc2wiki monodoc_xmlfile"); return 1; } XmlDocument doc = new XmlDocument (); #if VALIDATION XmlTextReader xr = new XmlTextReader (args [0]); RelaxngPattern rp = RncParser.ParseRnc (new StreamReader ("CLILibraryTypes.rnc")); Console.Error.WriteLine ("**** READY ****"); rp.Compile (); Console.Error.WriteLine ("**** DONE ****"); RelaxngValidatingReader rvr = new RelaxngValidatingReader (xr, rp); doc.Load (rvr); rvr.Close (); #else doc.Load (args [0]); #endif Monodoc2Wiki instance = new Monodoc2Wiki (); string ret = instance.ProcessNode (doc.DocumentElement); Console.WriteLine (ret); return 0; }
public static int sMain(string [] args) { if (args.Length < 1) { Console.WriteLine("Usage: monodoc2wiki monodoc_xmlfile"); return(1); } XmlDocument doc = new XmlDocument(); #if VALIDATION XmlTextReader xr = new XmlTextReader(args [0]); RelaxngPattern rp = RncParser.ParseRnc(new StreamReader("CLILibraryTypes.rnc")); Console.Error.WriteLine("**** READY ****"); rp.Compile(); Console.Error.WriteLine("**** DONE ****"); RelaxngValidatingReader rvr = new RelaxngValidatingReader(xr, rp); doc.Load(rvr); rvr.Close(); #else doc.Load(args [0]); #endif Monodoc2Wiki instance = new Monodoc2Wiki(); string ret = instance.ProcessNode(doc.DocumentElement); Console.WriteLine(ret); return(0); }