Here you can find the source of getChildNode(Node node, String name)
private static Node getChildNode(Node node, String name)
//package com.java2s; //License from project: Open Source License import org.w3c.dom.Node; public class Main { private static Node getChildNode(Node node, String name) { for (int i = 0; i < node.getChildNodes().getLength(); i++) { String nodeName = node.getChildNodes().item(i).getNodeName(); if (nodeName.endsWith(name)) return node.getChildNodes().item(i); }// w ww. jav a 2 s . c o m return null; } }