org.iso_relax.jaxp
Class ValidatingSAXParserFactory
java.lang.Object
|
+--javax.xml.parsers.SAXParserFactory
|
+--org.iso_relax.jaxp.ValidatingSAXParserFactory
- public class ValidatingSAXParserFactory
- extends SAXParserFactory
Wraps another SAXParserFactory
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 |
_WrappedFactory
protected SAXParserFactory _WrappedFactory
_Schema
protected Schema _Schema
ValidatingSAXParserFactory
public ValidatingSAXParserFactory(Schema schema)
- creates a new instance that wraps the default DocumentBuilderFactory
- Parameters:
schema
- the compiled Schema object. It can not be null.
ValidatingSAXParserFactory
public ValidatingSAXParserFactory(SAXParserFactory wrapped,
Schema schema)
- creates a new instance with an internal SAXParserFactory and Schema.
- Parameters:
wrapped
- internal SAXParserschema
- compiled schema.
newSAXParser
public SAXParser newSAXParser()
throws ParserConfigurationException,
SAXException
- returns a new SAX parser.
If setValidating(false) is called previously, this method simply
returns the implementation of wrapped SAXParser.
- Specified by:
newSAXParser
in class SAXParserFactory
ParserConfigurationException
SAXException
setFeature
public void setFeature(java.lang.String name,
boolean value)
throws ParserConfigurationException,
SAXNotRecognizedException,
SAXNotSupportedException
- Specified by:
setFeature
in class SAXParserFactory
ParserConfigurationException
SAXNotRecognizedException
SAXNotSupportedException
- See Also:
SAXParserFactory.setFeature(String, boolean)
getFeature
public boolean getFeature(java.lang.String name)
throws ParserConfigurationException,
SAXNotRecognizedException,
SAXNotSupportedException
- Specified by:
getFeature
in class SAXParserFactory
ParserConfigurationException
SAXNotRecognizedException
SAXNotSupportedException
- See Also:
SAXParserFactory.getFeature(String)
isNamespaceAware
public boolean isNamespaceAware()
- Overrides:
isNamespaceAware
in class SAXParserFactory
setNamespaceAware
public void setNamespaceAware(boolean awareness)
- Overrides:
setNamespaceAware
in class SAXParserFactory
isValidating
public boolean isValidating()
- Overrides:
isValidating
in class SAXParserFactory
setValidating
public void setValidating(boolean validating)
- Overrides:
setValidating
in class SAXParserFactory