Code example for XPathFactory

Methods: newXPath

public class XmlHandler { 
  private Repository repository = new Repository();
  private static XPathFactory factory = XPathFactory.newInstance();
  private static XPath xpath = factory.newXPath();
   * Takes in an XML document formatted according to the System-H REST API specified here: 
   * <url></url> as of 
   * March 15, 2011, and stores it to the IHaleRepository. If something fails inside this method, 
   * nothing will be stored inside the repository. 
   * @param doc the Document to be parsed. 
   * @throws IOException in case of parsing error. 
   * @throws XPathExpressionException in the event of failed compilation. 
   * @return true if successful, false otherwise. 
  public Boolean parseIhaleXml2StateEntry(Document doc) throws IOException,
      XPathExpressionException {