No, the parse isn't failing at all. Clearly the parse produces a Document object whose value is null. If you look at the API documentation for the org.w3c.dom.Node interface it tells you that the nodeName of a Document node is "#document" and that the nodeValue of a Document node is null -- which is exactly what you're seeing there. So you've got a perfectly normal Document object. What that means is only that the nodeValue of a Document object is not a very useful thing.
anupam kumar prasad
posted 4 years ago
Thanks for the tip. I have resolved the issue. getChildNodes() came in handy!