Hi, I'm trying to parse a xml document which is going to have a entity references such as & quot; & nbsp; etc.. as Node values. But when I try to get the node value with the getNodeValue() method of the Node object, it's not giving me the complete content. Ex :
[Note : I have not typed the entity reference charectors properly here since it's converting it to it's representation.] Please help. Thanks in advance. [ September 21, 2003: Message edited by: Shan Karawita ]
I wonder how createXmlDocument(java.lang.String documentURI, boolean doValidate) didn't throw an exception already when you tried to feed the document itself as a string to it? (unless you just typed a quick example)
You are right. As you mentioned I have typed a quick example here. It should have been a InputStream. Has it happend to anyone ....? Please help ... I'm really stucked. [ September 21, 2003: Message edited by: Shan Karawita ]
Here you are assuming that "C" has only one child ( ie the Text that you typed). It is not the case actually. Even though it appears as if there is only one child of type TEXT, it might have multiple such TEXT nodes. So it's recommended that you always run through all the child nodes of type TEXT and append the node value. Here i have not checked for the node type, since you dont have any other child elements.