Esempio n. 1
0
 /**
  * Creates a new {@link XPathUtils} instance.
  *
  * @param is The {@link InputStream} with XML data.
  * @return A new {@link XPathUtils} instance.
  * @throws SAXException If there's a SAX error in the XML.
  * @throws IOException If there's an IO error reading the stream.
  */
 public static XPathUtils newXPath(final InputStream is) throws SAXException, IOException {
   final XPathFactory xpfactory = XPathFactory.newInstance();
   final XPath xPath = xpfactory.newXPath();
   final Document doc = XmlUtils.toDoc(is);
   return new XPathUtils(xPath, doc);
 }