05-23-2009 12:27 AM
I am using the w3c dom parser and noticed that the getNodeValue() method on a Node object does not seem to be able to parse & correctly. The xml used is as follows:
<name>name with ampersand & and other stuff</name>
The returned result on calling getNodeValue() was: "name with ampersand "
It is truncating the string on seeing the "&". Is anyone else seeing this problem? If so, do you know a fix for it?
Solved! Go to Solution.
05-23-2009 09:27 AM
I had this also - I wound up writing a utility class to "scrub" the HTML entities from the XML and convert them to unicode.
Example: & becomes &
There is probably a better way, but I couldn't find it!