Here you can find the source of getTypeName(Node nameNode)
private static String getTypeName(Node nameNode)
//package com.java2s; //License from project: Open Source License import org.w3c.dom.Node; import org.w3c.dom.NodeList; public class Main { private static String getTypeName(Node nameNode) { Node firstChild = nameNode.getFirstChild(); if (firstChild == null) { return null; }// w w w. j a v a 2 s . c om String nodeValue = firstChild.getNodeValue(); String nameType = ""; if (nodeValue != null && !nodeValue.trim().isEmpty()) { nameType = nodeValue + "."; } else if (nameNode.getChildNodes().getLength() > 1) { NodeList childNodes2 = nameNode.getChildNodes(); for (int j = 0; j < childNodes2.getLength(); j++) { Node child = childNodes2.item(j); if (!"name".equalsIgnoreCase(child.getNodeName())) { continue; } String nodeValue2 = getTypeName(child); nameType += nodeValue2; } } return nameType; } }