Handling Element Nodes:
case Node.ELEMENT_NODE: {
System.out.println("Element : " + node.getNodeName());
NodeList childNodes = node.getChildNodes();
if(childNodes != null) {
int length = childNodes.getLength();
for (int loopIndex = 0; loopIndex < length ; loopIndex++)
{
display_names(childNodes.item(loopIndex));
}
}
break;
}