org.iso_relax.jaxp
Class ValidatingDocumentBuilderFactory
java.lang.Object
|
+--javax.xml.parsers.DocumentBuilderFactory
|
+--org.iso_relax.jaxp.ValidatingDocumentBuilderFactory
- public class ValidatingDocumentBuilderFactory
- extends DocumentBuilderFactory
Wraps another DocumentBuilderFactory
and adds validation capability.
- Author:
- Daisuke OKAJIMA
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_Schema
protected Schema _Schema
_WrappedFactory
protected DocumentBuilderFactory _WrappedFactory
ValidatingDocumentBuilderFactory
public ValidatingDocumentBuilderFactory(Schema schema)
- creates a new instance that wraps the default DocumentBuilderFactory
- Parameters:
schema
- the compiled Schema object. It can not be null.
ValidatingDocumentBuilderFactory
public ValidatingDocumentBuilderFactory(DocumentBuilderFactory wrapped,
Schema schema)
- creates a new instance with an internal DocumentBuilderFactory and Schema.
- Parameters:
wrapped
- internal DocumentBuilderFactoryschema
- compiled schema.
newDocumentBuilder
public DocumentBuilder newDocumentBuilder()
throws ParserConfigurationException
- returns a new DOM parser.
If setValidating(false) is called previously, this method
simply returns the implementation of wrapped DocumentBuilder.
- Specified by:
newDocumentBuilder
in class DocumentBuilderFactory
ParserConfigurationException
setAttribute
public void setAttribute(java.lang.String name,
java.lang.Object value)
- Specified by:
setAttribute
in class DocumentBuilderFactory
- See Also:
DocumentBuilderFactory.setAttribute(String, Object)
getAttribute
public java.lang.Object getAttribute(java.lang.String name)
- Specified by:
getAttribute
in class DocumentBuilderFactory
- See Also:
DocumentBuilderFactory.getAttribute(String)
isValidating
public boolean isValidating()
- Overrides:
isValidating
in class DocumentBuilderFactory
setValidating
public void setValidating(boolean _validating)
- Overrides:
setValidating
in class DocumentBuilderFactory
isCoalescing
public boolean isCoalescing()
- Overrides:
isCoalescing
in class DocumentBuilderFactory
isExpandEntityReference
public boolean isExpandEntityReference()
isIgnoringComments
public boolean isIgnoringComments()
- Overrides:
isIgnoringComments
in class DocumentBuilderFactory
isIgnoringElementContentWhitespace
public boolean isIgnoringElementContentWhitespace()
- Overrides:
isIgnoringElementContentWhitespace
in class DocumentBuilderFactory
isNamespaceAware
public boolean isNamespaceAware()
- Overrides:
isNamespaceAware
in class DocumentBuilderFactory
setCoalescing
public void setCoalescing(boolean coalescing)
- Overrides:
setCoalescing
in class DocumentBuilderFactory
setExpandEntityReference
public void setExpandEntityReference(boolean expandEntityRef)
setIgnoringComments
public void setIgnoringComments(boolean ignoreComments)
- Overrides:
setIgnoringComments
in class DocumentBuilderFactory
setIgnoringElementContentWhitespace
public void setIgnoringElementContentWhitespace(boolean whitespace)
- Overrides:
setIgnoringElementContentWhitespace
in class DocumentBuilderFactory
setNamespaceAware
public void setNamespaceAware(boolean awareness)
- Overrides:
setNamespaceAware
in class DocumentBuilderFactory