code: public static NodeList searchNodesXPath(String expression, Node doc)
  	{
  		try
  		{
  			XPath xPath = XPathFactory.newInstance().newXPath();
  
  			return (NodeList) xPath.compile(expression).evaluate(doc, XPathConstants.NODESET);
  		}
  		catch (XPathExpressionException e)
  		{
  			throw new IllegalArgumentException("expression:" + expression + " error" + e.getMessage(), e);
  		}
  	}
docs: ------------------------------------------------