public abstract class AbstractReaderSchemaFactory extends java.lang.Object implements XMLReaderJDOMFactory
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
构造器和说明 |
---|
AbstractReaderSchemaFactory(javax.xml.parsers.SAXParserFactory fac,
javax.xml.validation.Schema schema)
XMLReader instances from this class will be configured to validate using
the supplied Schema instance.
|
限定符和类型 | 方法和说明 |
---|---|
org.xml.sax.XMLReader |
createXMLReader()
Return a new XMLReader according to the implementation of this
XMLReaderJDOMFactory instance.
|
boolean |
isValidating()
Does an XMLReader from this factory do more than just well-formed checks.
|
public AbstractReaderSchemaFactory(javax.xml.parsers.SAXParserFactory fac, javax.xml.validation.Schema schema)
fac
- The SAXParserFactory to use for creating XMLReader instances.schema
- The Schema to use for validation.public org.xml.sax.XMLReader createXMLReader() throws JDOMException
XMLReaderJDOMFactory
SAXBuilder
.createXMLReader
在接口中 XMLReaderJDOMFactory
JDOMException
- if an XMLReader was not available.public boolean isValidating()
XMLReaderJDOMFactory
isValidating
在接口中 XMLReaderJDOMFactory