Java tutorial
//package com.java2s; import org.w3c.dom.Node; public class Main { /** * get child node by name * * @param parent * @param name * @return */ public static Node getNodeByName(Node parent, String name) { for (int i = 0; i < parent.getChildNodes().getLength(); i++) { if (parent.getChildNodes().item(i).getNodeName().equals(name)) return parent.getChildNodes().item(i); } return null; } }