Esempio n. 1
0
 /**
  * Validates an xml document with respect to an xml schema described by .xsd file path using
  * supplied error handler.
  *
  * @param schemaPath
  * @param xml
  * @param eh
  * @return
  * @throws Exception
  */
 public static Element validateInfo(String schemaPath, Element xml, ErrorHandler eh)
     throws Exception {
   validateGuts(schemaPath, xml, eh);
   if (eh.errors()) {
     return eh.getXPaths();
   } else {
     return null;
   }
 }