 <p>Use:</p> <pre><code>NodeList nodeList = doc.getElementsByTagName("xLabel"); for (int temp = 0; temp &lt; nodeList.getLength(); temp++) { Node node = nodeList.item(temp); NodeList namexLabelNodes = node.getChildNodes(); for (int i = 0; i &lt; namexLabelNodes.getLength(); i++) { System.out.println(" Name : " + namexLabelNodes.item(i).getTextContent()); } } </code></pre> <p>For yLabel will be same code. </p>