Here you can find the source of selectNodes(Node nodeParent, String name)
public static NodeList selectNodes(Node nodeParent, String name)
//package com.java2s; //License from project: Open Source License import org.w3c.dom.*; import javax.xml.xpath.*; public class Main { public static NodeList selectNodes(Node nodeParent, String name) { try {/*from w w w.ja v a 2s .co m*/ XPath xpath = XPathFactory.newInstance().newXPath(); return (NodeList) xpath.evaluate(name, nodeParent, XPathConstants.NODESET); } catch (Exception e) { return null; } } }