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.ParserConfigurationExceptionpublic org.w3c.dom.DOMImplementation getDOMImplementation()
getDOMImplementation in class javax.xml.parsers.DocumentBuilderpublic boolean isNamespaceAware()
isNamespaceAware in class javax.xml.parsers.DocumentBuilderpublic boolean isValidating()
isValidating in class javax.xml.parsers.DocumentBuilderpublic org.w3c.dom.Document newDocument()
newDocument in class javax.xml.parsers.DocumentBuilderpublic org.w3c.dom.Document parse(org.xml.sax.InputSource is)
throws org.xml.sax.SAXException,
java.io.IOException
parse in class javax.xml.parsers.DocumentBuilderorg.xml.sax.SAXExceptionjava.io.IOExceptionpublic org.w3c.dom.Document parse(java.io.File f)
throws org.xml.sax.SAXException,
java.io.IOException
parse in class javax.xml.parsers.DocumentBuilderorg.xml.sax.SAXExceptionjava.io.IOExceptionpublic org.w3c.dom.Document parse(java.io.InputStream is)
throws org.xml.sax.SAXException,
java.io.IOException
parse in class javax.xml.parsers.DocumentBuilderorg.xml.sax.SAXExceptionjava.io.IOExceptionpublic 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.DocumentBuilderorg.xml.sax.SAXExceptionjava.io.IOExceptionpublic org.w3c.dom.Document parse(java.lang.String url)
throws org.xml.sax.SAXException,
java.io.IOException
parse in class javax.xml.parsers.DocumentBuilderorg.xml.sax.SAXExceptionjava.io.IOExceptionpublic void setEntityResolver(org.xml.sax.EntityResolver resolver)
setEntityResolver in class javax.xml.parsers.DocumentBuilderpublic void setErrorHandler(org.xml.sax.ErrorHandler handler)
setErrorHandler in class javax.xml.parsers.DocumentBuilderprivate org.w3c.dom.Document verify(org.w3c.dom.Document dom)
throws org.xml.sax.SAXException,
java.io.IOException
org.xml.sax.SAXExceptionjava.io.IOException