Write whole xml document as a node
using System;
using System.Xml;
class MainClass
{
static void Main(string[] args)
{
XmlTextWriter writer = new XmlTextWriter("C:\\xmlWriterTest.xml", null);
writer.WriteStartDocument();
XmlTextReader reader = new XmlTextReader(@"C:\node.xml");
while (!reader.EOF)
{
writer.WriteNode(reader, false);
}
writer.WriteEndDocument();
writer.Close();
return;
}
}
|
HTML code for linking to this page:
Related in same category :
-
-
-
-
|