Processing an XML file removes comments

Posted by little on Stack Overflow See other posts from Stack Overflow or by little
Published on 2010-05-09T08:33:10Z Indexed on 2010/05/09 8:38 UTC
Read the original article Hit count: 188

Filed under:
|
|

This snippet <!--Please don't delete this--> is part of my xml file. After running this method, the resulting xml file does not contain this snippet anymore <!--Please don't delete this-->. Why is this?

Here's my method:

         XmlSerializer serializer = new XmlSerializer(typeof(Settings));
         TextWriter writer = new StreamWriter(path);
         serializer.Serialize(writer, settings);
         writer.Close();    

© Stack Overflow or respective owner

Related posts about Xml

Related posts about c#