If I read it correctly, the desired content is not an attribute but the element text content instead. Which is where either the getTextContent() method can help, or if that's not available (there was a
thread about that just recently) check the nodes that are Text. Because the nodes do not need to be Element nodes; Text, ProcessingInstruction, Comment - those are nodes as well.
Another possibility is to not use the org.w3c.dom package but use a library (like JDOM) instead.