Ccdaxpathvalidators is java libary that contains validators for C-CDA files to be used by the xpathvalidator at (.
To use:
- Include the xpathvalidator.jar on your classpath
- Create your custom validator class by implementing one of the included interfaces:
- org.sitenv.xml.xpathvalidator.engine.MultipleXPathNodeValidator
- Use this validator interface to return multiple validation results from a single validator
- org.sitenv.xml.xpathvalidator.engine.XPathNodeValidator
- Use this validator interface to return a single validation result from a single validator
- Create a configuration xml file to specify the use of the validator. The configuration file should be int the following syntax:
private static XPathValidationEngine engine = null;
. . .
engine = new XPathValidationEngine(); File file = new File("path/to/fileToBeValidate");
engine.initialize(props.getProperty("path/to/configFile.xml"));
List results = engine.validate(file.getInputStream());