I am getting unexpected values from an XML parse using DOM. Can someone tell me why this is happening?
Here is the XML node I'm parsing:
That is an MS Excel 2003
doc converted to XML. Here is the
test code to parse just this node:
Here is the output:
ROOT: Workbook
NODE NAME: DocumentProperties
List size = 11
Node: 0 Name: #text
Node: 1 Name: LastAuthor
Node: 2 Name: #text
Node: 3 Name: LastPrinted
Node: 4 Name: #text
Node: 5 Name: Created
Node: 6 Name: #text
Node: 7 Name: LastSaved
Node: 8 Name: #text
Node: 9 Name: Version
Node: 10 Name: #text
First problem is that I expect 5 nodes not 10. Where is: "#text" coming from?
I also do not understand why I have to say:
Node nextNode = root.getFirstChild()
Element docNode = nextNode.getNextSibling()//docNode should be first child
"DocumentProperties" should be the first child. But if I rely on that, I again get a node name of: "#text" as well.
Thanks.
Tom