Java XPath Select selectNodes(Node nodeParent, String name)

Here you can find the source of selectNodes(Node nodeParent, String name)

Description

select Nodes

License

Open Source License

Declaration

public static NodeList selectNodes(Node nodeParent, String name) 

Method Source Code

//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;
        }
    }
}

Related

  1. selectElements(Element element, String xpathExpression)
  2. selectNodeIterator(Node nContextNode, String sXPath)
  3. selectNodeList(Node contextNode, String expression)
  4. selectNodeList(Node node, String expression)
  5. selectNodes(final Node node, final String xPath)
  6. selectNodes(String express, Object source)
  7. selectNodes(String xPath, Node target)
  8. selectNodes(String xpath, Object node)
  9. selectNodes(String xpath, Object node)