J
Jack
I wrote the following codes to write an XML document. The file output is
fine except it missed out the line <?xml version="1.0"?>. How do I add it ?
//load the xml file
XmlDocument doc = new XmlDocument();
doc.AppendChild(serializer.WriteConfiguration(doc, config));
XmlTextWriter writer = new XmlTextWriter(file,
System.Text.Encoding.UTF8);
doc.WriteTo(writer);
writer.Close();
fine except it missed out the line <?xml version="1.0"?>. How do I add it ?
//load the xml file
XmlDocument doc = new XmlDocument();
doc.AppendChild(serializer.WriteConfiguration(doc, config));
XmlTextWriter writer = new XmlTextWriter(file,
System.Text.Encoding.UTF8);
doc.WriteTo(writer);
writer.Close();