Java tutorial
//package com.java2s; import org.w3c.dom.Node; import org.w3c.dom.NodeList; public class Main { public static Node getChildNode(String name, Node node) { if (node == null) { return null; } NodeList list = node.getChildNodes(); for (int i = 0; i < list.getLength(); i++) { Node no = list.item(i); if (no.getNodeName().equalsIgnoreCase(name)) { return no; } } return null; } }