This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
I see your problem... you think that the toString() method of an Element will convert the Element and all of its children to XML and return that. But it doesn't. It just returns the node value. For the node value of various kinds of nodes see the API documentation for org.w3c.dom.Node; in particular notice what the node value of an Element is.