AbstractReaderSchemaFactory class returns XMLReaders configured to
validate against the supplied Schema instance. The Schema could be an XSD
schema or some other schema supported by SAX (e.g. RelaxNG). It takes a pre-declared
If you want to validate an XML document against the XSD references embedded
in the XML itself (xsdSchemaLocation) then you do not want to use this class
but rather use an alternate means like
XMLReaders#XSDVALIDATING.
See the package documentation for the best
alternatives.
org.jdom2.input.sax
| Modifier and Type | Field and Description |
|---|---|
| private final SAXParserFactory |
| Access | Constructor and Description |
|---|---|
| public | AbstractReaderSchemaFactory(final SAXParserFactory
The SAXParserFactory to use for creating XMLReader instances. fac, final Schema The Schema to use for validation. schema)XMLReader instances from this class will be configured to validate using the supplied Schema instance. |
| Modifier and Type | Method and Description |
|---|---|
| public XMLReader | createXMLReader()
Implements org. |
| public boolean | isValidating()
Implements org. |
| saxfac | back to summary |
|---|---|
| private final SAXParserFactory saxfac | |
| AbstractReaderSchemaFactory | back to summary |
|---|---|
| public AbstractReaderSchemaFactory(final SAXParserFactory fac, final Schema schema) XMLReader instances from this class will be configured to validate using the supplied Schema instance.
| |
| createXMLReader | back to summary |
|---|---|
| public XMLReader createXMLReader() throws JDOMException Implements org. Doc from org. Return a new XMLReader according to the implementation of this
XMLReaderJDOMFactory instance. The XMLReader is expected to be a new
instance that is unrelated to any other XMLReaders, and can be reused at
will by
| |
| isValidating | back to summary |
|---|---|
| public boolean isValidating() Implements org. Doc from org. Does an XMLReader from this factory do more than just well-formed checks.
| |