|
Xerces 3.1.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.xml.parsers.SAXParserFactory
The SAXParserFactory
defines a factory API that enables
applications to configure and obtain a SAX based parser to parse XML
documents.
ATTENTION: THIS IMPLEMENTATION OF THE "JAVAX.XML.PARSER" CLASSES
IS NOT THE OFFICIAL REFERENCE IMPLEMENTATION OF THE JAVA SPECIFICATION
REQUEST 5 FOUND AT
http://java.sun.com/aboutJava/communityprocess/jsr/jsr_005_xml.html
THIS IMPLEMENTATION IS CONFORMANT TO THE "JAVA API FOR XML PARSING"
SPECIFICATION VERSION 1.0 PUBLIC RELEASE 1 BY JAMES DUNCAN DAVIDSON
PUBLISHED BY SUN MICROSYSTEMS ON FEB. 18, 2000 AND FOUND AT
http://java.sun.com/xml
THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Constructor Summary | |
protected |
SAXParserFactory()
Implementors of this abstract class must provide their own public no-argument constructor in order for the static newInstance() method to work correctly. |
Method Summary | |
boolean |
isNamespaceAware()
Indicates if this SAXParserFactory is configured to
produce parsers that are namespace aware or not. |
boolean |
isValidating()
Indicates if this SAXParserFactory is configured to
produce parsers that validate XML documents as they are parsed. |
static SAXParserFactory |
newInstance()
Returns a new instance of a SAXParserFactory . |
abstract SAXParser |
newSAXParser()
Returns a new configured instance of type SAXParser . |
void |
setNamespaceAware(boolean aware)
Configuration method that specifies whether the parsers created by this factory are required to provide XML namespace support or not. |
void |
setValidating(boolean validating)
Configuration method whether specifies if the parsers created by this factory are required to validate the XML documents that they parse. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected SAXParserFactory()
newInstance()
method to work correctly.
Method Detail |
public static SAXParserFactory newInstance()
SAXParserFactory
.
javax.xml.parsers.SAXParserFactory
system property or, if the property is not set, a platform specific
default.FactoryConfigurationError
- If the class implementing the
factory cannot be found or instantiated.
An Error
is thrown instead of an exception
because the application is not expected to handle or
recover from such events.public abstract SAXParser newSAXParser() throws ParserConfigurationException, SAXException
SAXParser
.ParserConfigurationException
- If the SAXParser
instance cannot be created with the requested
configuration.SAXException
- If the initialization of the underlying parser
fails.public void setNamespaceAware(boolean aware)
ParserConfigurationException
will be thrown when the
program attempts to aquire the parser calling the
newSaxParser()
method.public void setValidating(boolean validating)
ParserConfigurationException
will be thrown when
the application attempts to aquire the parser via the
newSaxParser()
method.public boolean isNamespaceAware()
SAXParserFactory
is configured to
produce parsers that are namespace aware or not.public boolean isValidating()
SAXParserFactory
is configured to
produce parsers that validate XML documents as they are parsed.
|
Xerces 3.1.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |