But I want to read all ChildNode's NodeValue instead of null. for example,<author>Michael</author>,so The child node is : author and the node value is: "Michael" instead of "null"... How can I achieve this? Thanks in advance...
If you take a look at org.w3c.dom.Node class' javadocs, you'll find a nice table summarizing what getNodeName() and getNodeValue() will return for different types of nodes. For elements, getNodeValue() always returns null. That's because they don't have a value, but child elements. In your case, the "author" element has one or more child elements of type "#text"... You need to getChildNodes() and append their values together in order to get "Michael".