Esempio n. 1
0
 public static void Write(string filename, Node root)
 {
     using (var xml = XmlWriter.Create(filename, DefaultSettings)) {
         var document = new XDocument();
         var writer   = new ReportWriter(document);
         root.Visit(writer);
         document.WriteTo(xml);
     }
 }
Esempio n. 2
0
        public static void Write(TextWriter output, Node root)
        {
            using (var xml = XmlWriter.Create(output, DefaultSettings)) {
                var document = new XDocument();
                var writer   = new ReportWriter(document);
                root.Visit(writer);
                document.WriteTo(xml);
            }

            output.WriteLine();
        }