Hi everyone, I have a little problem with the class XmlDocument in .net. I'm using framework 2.0 and I am loading an xmlDocument from a path. The xml has a node without value like this:
When I load the xml using the xmlDocument class, it seems that it is internally modified to read this as:
where "_" is a white space. Does somebody know how to prevent this from happening ? It is very important to me to read all xml's EXACTLY as they are without suffering any kind of change.
My xml is really big, but the only problem I have is in a node without value that has exactly this form:
<xml>
.
.
.
<Datos_Contacto/>
.
.
.
</xml>
My vb code is really simple as well :
Dim xmlDoc As New Xml.XmlDocument
Dim pathToXml as String = "C:\xmlExample.xml"
xmlDoc.Load(pathToXml)
at this point when I do an inspection on xmlDoc.InnerXml the previous node has changed from : to (with a white space before the slash). It is critical for me to preserve the original xml once loaded.