954,517 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

XML Problem in Vb.net

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.

Any help or ideas will be greatly appreciated :)

dmarvp
Newbie Poster
3 posts since Apr 2008
Reputation Points: 10
Solved Threads: 0
 

Please attach XML document along with code you have written so far.

__avd
Posting Genius (adatapost)
Moderator
8,648 posts since Oct 2008
Reputation Points: 2,136
Solved Threads: 1,241
 

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.

Any ideas ?

dmarvp
Newbie Poster
3 posts since Apr 2008
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: