A familiar problem. Consult the table in the org.w3c.dom.Node JavaDocs.
You will see that Document type nodes return null for nodeValue (as for example in a System.out.println statement)
Everybody working with XML DOM methods should become very very familiar with that table.
Bill
Thank you for your great comment.
yes, as you said the node name is found and node value is null of document, but is this mean we can't work on document? regarding to XML file, I used this code to get the elements:
nodeList equal null, is this the correct way to get elements?