Class EvmXmlValidator
java.lang.Object
net.finmath.smartcontracts.representablestate.xml.EvmXmlValidator
Utility to validate the XML output of an IXMLRepresentableState contract
against the evmstate binding schema (and optionally additional business XSDs).
This is intended for tests / tooling.
- Author:
- Christian Fries
-
Constructor Summary
ConstructorsConstructorDescriptionEvmXmlValidator(String evmstateXsdPath, String... businessXsdPaths) Create a validator using the evmstate-binding XSD and optional additional XSDs (e.g. business schemas such as FpML or BDT). -
Method Summary
-
Constructor Details
-
EvmXmlValidator
Create a validator using the evmstate-binding XSD and optional additional XSDs (e.g. business schemas such as FpML or BDT). The given paths are treated as classpath resources (e.g. placed under src/main/resources) and resolved via the context ClassLoader.- Parameters:
evmstateXsdPath- classpath path to evmstate-bindings.xsd (e.g. "evmstate-bindings.xsd" or "xsd/evmstate-bindings.xsd")businessXsdPaths- optional additional XSDs (classpath paths) to validate the business XML structure- Throws:
SAXException- if schema compilation fails
-
-
Method Details
-
validate
Validate an XML string against the configured schema.- Parameters:
xml- the XML document as string- Throws:
SAXException- if validation fails (structurally invalid)IOException- if an IO error occurs while reading the XML
-