Xml with spaces as InnerText

Posted by David Rutten on Stack Overflow See other posts from Stack Overflow or by David Rutten
Published on 2010-05-06T19:03:04Z Indexed on 2010/05/06 19:08 UTC
Read the original article Hit count: 151

Filed under:
|
|

I'm parsing Xml data which has entries like this:

<item name="UserText" type_name="gh_string" type_code="10">      </item>

I'm supposed to read the 6 spaces as a String, but both the InnerText and InnerXml values of the System.Xml.XmlNode are zero length Strings.

Is there any way I can get at this whitespace data in existing files and what do I need to do in the future to prevent this sort of screw up?

© Stack Overflow or respective owner

Related posts about c#

Related posts about Xml