I am using XmlDocument to parse xml file, but it seems that XmlDocument is always reading xml comments as a xml nodes:
My C# code
XmlDocument xml = new XmlDocument();
xml.Load(filename);
foreach (XmlNode node in xml.FirstChild.ChildNodes) {
}
Xml file
<project>
<!-- comments-->
<application name="app1">
<property name="ip" value="10.18.98.100"/>
</application>
</project>
Shouldn't .NET skip XML comments?