I have parsing XML documents with Java 1.7. When I run the function document.getElementByTagName("Product")
, I get a number of 6000, but if I open it with Notepad++, I see only 3000 entries.
I have problem with looping through all elements with the wrong number of entries.
I solved the problem. The problem was with the XML file. The parent Node had the same name as one of the Children nodes. for example.
Thats why it, each entry counted twice