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.
Move lines 13-15 to before the loop; they are called for the node itself, not the child nodes.
Be warned though that the cast to Element may fail; whitespace like line breaks are often seen as Text nodes, and will show up in the child node list.