private NodeList getNodeList(String document, XPathExpression expression) throws Exception
   {
      Document doc = m_documentBuilder.parse(new InputSource(new StringReader(document)));
      return (NodeList) expression.evaluate(doc, XPathConstants.NODESET);
   }
private NodeList getNodeList ( String document , XPathExpression expression ) throws Exception { Document doc = m_documentBuilder . parse ( new InputSource ( new StringReader ( document ) ) ) ; return ( NodeList ) expression . evaluate ( doc , XPathConstants . NODESET ) ; }
Retrieve a node list based on an XPath expression.

@param document XML document to process
@param expression compiled XPath expression
@return node list