Code example for XPath

Methods: compile

0
    throws Exception 
  { 
    if(XPATH == null){
      XPATH = XPathFactory.newInstance().newXPath();
    } 
    return XPATH.compile(xpath);
  } 
 
  /** 
   * Validate the supplied xml file. 
   * 
   * @param project The project name. 
   * @param filename The file path to the xml file. 
   * @return A possibly empty array of errors. 
   */ 
  public static List<Error> validateXml(String project, String filename)
    throws Exception 
  { 
    return validateXml(project, filename, false, null);
  }