class DocumentBuilderImpl
extends javax.xml.parsers.DocumentBuilder
This class uses another DocumentBuilder implementation and adds the validation capability to it.
Modifier and Type | Field and Description |
---|---|
private javax.xml.parsers.DocumentBuilder |
core
Wrapped DocumentBuilder that does everything else.
|
private org.iso_relax.verifier.Verifier |
verifier
The validation will be performed using this verifier.
|
Constructor and Description |
---|
DocumentBuilderImpl(javax.xml.parsers.DocumentBuilder _core,
org.iso_relax.verifier.Schema _schema) |
Modifier and Type | Method and Description |
---|---|
org.w3c.dom.DOMImplementation |
getDOMImplementation() |
boolean |
isNamespaceAware() |
boolean |
isValidating() |
org.w3c.dom.Document |
newDocument() |
org.w3c.dom.Document |
parse(java.io.File f) |
org.w3c.dom.Document |
parse(org.xml.sax.InputSource is) |
org.w3c.dom.Document |
parse(java.io.InputStream is) |
org.w3c.dom.Document |
parse(java.io.InputStream is,
java.lang.String systemId) |
org.w3c.dom.Document |
parse(java.lang.String url) |
void |
setEntityResolver(org.xml.sax.EntityResolver resolver) |
void |
setErrorHandler(org.xml.sax.ErrorHandler handler) |
private org.w3c.dom.Document |
verify(org.w3c.dom.Document dom)
Validates a given DOM and returns it if it is valid.
|
private final javax.xml.parsers.DocumentBuilder core
private final org.iso_relax.verifier.Verifier verifier
DocumentBuilderImpl(javax.xml.parsers.DocumentBuilder _core, org.iso_relax.verifier.Schema _schema) throws javax.xml.parsers.ParserConfigurationException
javax.xml.parsers.ParserConfigurationException
public org.w3c.dom.DOMImplementation getDOMImplementation()
getDOMImplementation
in class javax.xml.parsers.DocumentBuilder
public boolean isNamespaceAware()
isNamespaceAware
in class javax.xml.parsers.DocumentBuilder
public boolean isValidating()
isValidating
in class javax.xml.parsers.DocumentBuilder
public org.w3c.dom.Document newDocument()
newDocument
in class javax.xml.parsers.DocumentBuilder
public org.w3c.dom.Document parse(org.xml.sax.InputSource is) throws org.xml.sax.SAXException, java.io.IOException
parse
in class javax.xml.parsers.DocumentBuilder
org.xml.sax.SAXException
java.io.IOException
public org.w3c.dom.Document parse(java.io.File f) throws org.xml.sax.SAXException, java.io.IOException
parse
in class javax.xml.parsers.DocumentBuilder
org.xml.sax.SAXException
java.io.IOException
public org.w3c.dom.Document parse(java.io.InputStream is) throws org.xml.sax.SAXException, java.io.IOException
parse
in class javax.xml.parsers.DocumentBuilder
org.xml.sax.SAXException
java.io.IOException
public org.w3c.dom.Document parse(java.io.InputStream is, java.lang.String systemId) throws org.xml.sax.SAXException, java.io.IOException
parse
in class javax.xml.parsers.DocumentBuilder
org.xml.sax.SAXException
java.io.IOException
public org.w3c.dom.Document parse(java.lang.String url) throws org.xml.sax.SAXException, java.io.IOException
parse
in class javax.xml.parsers.DocumentBuilder
org.xml.sax.SAXException
java.io.IOException
public void setEntityResolver(org.xml.sax.EntityResolver resolver)
setEntityResolver
in class javax.xml.parsers.DocumentBuilder
public void setErrorHandler(org.xml.sax.ErrorHandler handler)
setErrorHandler
in class javax.xml.parsers.DocumentBuilder
private org.w3c.dom.Document verify(org.w3c.dom.Document dom) throws org.xml.sax.SAXException, java.io.IOException
org.xml.sax.SAXException
java.io.IOException