public final class XsdUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
validate(File dataFile,
File schemaFile)
Validates a data node against a schema.
|
static void |
validate(Node dataNode,
Node schemaNode)
Validates a data node against a schema.
|
static void |
validate(Node dataNode,
Node schemaNode,
LSResourceResolver xsdResourceResolver)
Validates a data node against a schema.
|
public static void validate(File dataFile, File schemaFile) throws SAXException, IOException, ParserConfigurationException
javax.xml.validation.Validator#validate(Source).dataFile - DOM data node to validate. Cannot be null.schemaFile - XML schema node to validate against. Cannot be null.SAXException - Thrown when there are validation errors. Also thrown on parsing
errors (e.g. from imports).IOException - Thrown when there are I/O errors (e.g. from imports).ParserConfigurationException - Thrown when couldn't create XML parser.public static void validate(Node dataNode, Node schemaNode) throws SAXException, IOException
javax.xml.validation.Validator#validate(Source).dataNode - DOM data node to validate. Cannot be null.schemaNode - XML schema node to validate against. Cannot be null.SAXException - Thrown when there are validation errors. Also thrown on parsing
errors (e.g. from imports).IOException - Thrown when there are I/O errors (e.g. from imports).public static void validate(Node dataNode, Node schemaNode, LSResourceResolver xsdResourceResolver) throws SAXException, IOException
javax.xml.validation.Validator#validate(Source).dataNode - DOM data node to validate. Cannot be null.schemaNode - XML schema node to validate against. Cannot be null.xsdResourceResolver - Resolves imports and include references in the schema.SAXException - Thrown when there are validation errors. Also thrown on parsing
errors (e.g. from imports).IOException - Thrown when there are I/O errors (e.g. from imports).Copyright © 2021. All rights reserved.