class XsdSchemaValidator
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
private static class |
XsdSchemaValidator.MyErrorHandler
Inner class MyErrorHandler implements ErrorHandler to handle errors which
may occur
|
Modifier and Type | Field and Description |
---|---|
private static int |
error_Count |
protected static java.util.List<java.lang.String> |
list |
protected static java.lang.String |
namespace |
private ResourceResolver |
rs |
protected static java.lang.String |
targetNamespace |
Constructor and Description |
---|
XsdSchemaValidator() |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
org.w3c.dom.Document |
doc(java.io.File xml)
Method to create document using DOM from xml file
|
int |
error_Count()
Method to get value from class XsdSchemaValidator
|
java.lang.String |
getList()
Method returning list of errors if validator find some.
|
java.lang.String |
getNamespace() |
java.lang.String |
getTargetNamespace() |
javax.xml.validation.Schema |
sch(java.lang.String schemaName)
Method to create schema
|
(package private) void |
validate(java.io.File xml,
java.lang.String schemaName)
Method responsible for validating and parsing xml and xsd
|
private static int error_Count
protected static java.util.List<java.lang.String> list
protected static java.lang.String namespace
protected static java.lang.String targetNamespace
private ResourceResolver rs
void validate(java.io.File xml, java.lang.String schemaName) throws java.lang.Exception
xml
- contain the File with xmlschemaName
- contain path to xsd filejava.lang.Exception
- throws Exceprions when files are parsing, validating etc...public java.lang.String getList()
public java.lang.String getNamespace()
public java.lang.String getTargetNamespace()
public int error_Count()
public org.w3c.dom.Document doc(java.io.File xml) throws java.lang.Exception
xml
- File with xmljava.lang.Exception
- throws by parser etc...public javax.xml.validation.Schema sch(java.lang.String schemaName) throws java.lang.Exception
schemaName
- contain path to schema filejava.lang.Exception
- throws by Schemapublic void clear()