public class DOMParser extends AbstractDOMParser
| Modifier and Type | Field and Description | 
|---|---|
| protected boolean | fUseEntityResolver2Use EntityResolver2. | 
| protected static java.lang.String | SYMBOL_TABLEProperty identifier: symbol table. | 
| protected static java.lang.String | USE_ENTITY_RESOLVER2Feature identifier: EntityResolver2. | 
| protected static java.lang.String | XMLGRAMMAR_POOLProperty identifier: XML grammar pool. | 
CORE_DOCUMENT_CLASS_NAME, CREATE_CDATA_NODES_FEATURE, CREATE_ENTITY_REF_NODES, CURRENT_ELEMENT_NODE, DEFAULT_DOCUMENT_CLASS_NAME, DEFER_NODE_EXPANSION, DOCUMENT_CLASS_NAME, fBaseURIStack, fCreateCDATANodes, fCreateEntityRefNodes, fCurrentCDATASection, fCurrentCDATASectionIndex, fCurrentEntityDecl, fCurrentNode, fCurrentNodeIndex, fDeferNodeExpansion, fDeferredDocumentImpl, fDeferredEntityDecl, fDocument, fDocumentClassName, fDocumentImpl, fDocumentIndex, fDocumentType, fDocumentTypeIndex, fDOMFilter, fErrorHandler, fFilterReject, fFirstChunk, fInCDATASection, fIncludeComments, fIncludeIgnorableWhitespace, fInDTD, fInDTDExternalSubset, fInEntityRef, fInternalSubset, fNamespaceAware, fRejectedElementDepth, fRoot, fSkippedElemStack, fStorePSVI, fStringBuffer, INCLUDE_COMMENTS_FEATURE, INCLUDE_IGNORABLE_WHITESPACE, NAMESPACES, PSVI_DOCUMENT_CLASS_NAMEfDocumentSource, fDTDContentModelSource, fDTDSourceENTITY_RESOLVER, ERROR_HANDLER, fConfiguration| Constructor and Description | 
|---|
| DOMParser()Constructs a DOM parser using the dtd/xml schema parser configuration. | 
| DOMParser(SymbolTable symbolTable)Constructs a DOM parser using the specified symbol table. | 
| DOMParser(SymbolTable symbolTable,
         org.apache.xerces.xni.grammars.XMLGrammarPool grammarPool)Constructs a DOM parser using the specified symbol table and
 grammar pool. | 
| DOMParser(org.apache.xerces.xni.parser.XMLParserConfiguration config)Constructs a DOM parser using the specified parser configuration. | 
| Modifier and Type | Method and Description | 
|---|---|
| org.xml.sax.EntityResolver | getEntityResolver()Return the current entity resolver. | 
| org.xml.sax.ErrorHandler | getErrorHandler()Return the current error handler. | 
| boolean | getFeature(java.lang.String featureId)Query the state of a feature. | 
| java.lang.Object | getProperty(java.lang.String propertyId)Query the value of a property. | 
| org.apache.xerces.xni.parser.XMLParserConfiguration | getXMLParserConfiguration()Returns this parser's XMLParserConfiguration. | 
| void | parse(org.xml.sax.InputSource inputSource)parse | 
| void | parse(java.lang.String systemId)Parses the input source specified by the given system identifier. | 
| void | setEntityResolver(org.xml.sax.EntityResolver resolver)Sets the resolver used to resolve external entities. | 
| void | setErrorHandler(org.xml.sax.ErrorHandler errorHandler)Allow an application to register an error event handler. | 
| void | setFeature(java.lang.String featureId,
          boolean state)Set the state of any feature in a SAX2 parser. | 
| void | setProperty(java.lang.String propertyId,
           java.lang.Object value)Set the value of any property in a SAX2 parser. | 
abort, attributeDecl, characters, comment, createAttrNode, createElementNode, doctypeDecl, dropDocumentReferences, elementDecl, emptyElement, endAttlist, endCDATA, endConditional, endDocument, endDTD, endElement, endExternalSubset, endGeneralEntity, endParameterEntity, externalEntityDecl, getDocument, getDocumentClassName, handleBaseURI, handleBaseURI, ignorableWhitespace, ignoredCharacters, internalEntityDecl, notationDecl, processingInstruction, reset, setCharacterData, setDocumentClassName, setLocale, startAttlist, startCDATA, startConditional, startDocument, startDTD, startElement, startExternalSubset, startGeneralEntity, startParameterEntity, textDecl, unparsedEntityDecl, xmlDeclany, element, empty, endContentModel, endGroup, getDocumentSource, getDTDContentModelSource, getDTDSource, occurrence, pcdata, separator, setDocumentSource, setDTDContentModelSource, setDTDSource, startContentModel, startGroupprotected static final java.lang.String USE_ENTITY_RESOLVER2
protected static final java.lang.String SYMBOL_TABLE
protected static final java.lang.String XMLGRAMMAR_POOL
protected boolean fUseEntityResolver2
public DOMParser(org.apache.xerces.xni.parser.XMLParserConfiguration config)
public DOMParser()
public DOMParser(SymbolTable symbolTable)
public DOMParser(SymbolTable symbolTable, org.apache.xerces.xni.grammars.XMLGrammarPool grammarPool)
public void parse(java.lang.String systemId)
           throws org.xml.sax.SAXException,
                  java.io.IOException
This method is equivalent to the following:
     parse(new InputSource(systemId));
 systemId - The system identifier (URI).org.xml.sax.SAXException - Throws exception on SAX error.java.io.IOException - Throws exception on i/o error.public void parse(org.xml.sax.InputSource inputSource)
           throws org.xml.sax.SAXException,
                  java.io.IOException
inputSource - org.xml.sax.SAXExceptionjava.io.IOExceptionpublic void setEntityResolver(org.xml.sax.EntityResolver resolver)
resolver - The new entity resolver. Passing a null value will
                 uninstall the currently installed resolver.public org.xml.sax.EntityResolver getEntityResolver()
setEntityResolver(org.xml.sax.EntityResolver)public void setErrorHandler(org.xml.sax.ErrorHandler errorHandler)
If the application does not register an error handler, all error events reported by the SAX parser will be silently ignored; however, normal processing may not continue. It is highly recommended that all SAX applications implement an error handler to avoid unexpected bugs.
Applications may register a new or different handler in the middle of a parse, and the SAX parser must begin using the new handler immediately.
errorHandler - The error handler.java.lang.NullPointerException - If the handler
            argument is null.getErrorHandler()public org.xml.sax.ErrorHandler getErrorHandler()
setErrorHandler(org.xml.sax.ErrorHandler)public void setFeature(java.lang.String featureId,
              boolean state)
                throws org.xml.sax.SAXNotRecognizedException,
                       org.xml.sax.SAXNotSupportedException
featureId - The unique identifier (URI) of the feature.state - The requested state of the feature (true or false).org.xml.sax.SAXNotRecognizedException - If the
            requested feature is not known.org.xml.sax.SAXNotSupportedException - If the
            requested feature is known, but the requested
            state is not supported.public boolean getFeature(java.lang.String featureId)
                   throws org.xml.sax.SAXNotRecognizedException,
                          org.xml.sax.SAXNotSupportedException
featureId - The unique identifier (URI) of the feature
                  being set.org.xml.sax.SAXNotRecognizedException - If the
            requested feature is not known.org.xml.sax.SAXNotSupportedException - If the
            requested feature is known but not supported.public void setProperty(java.lang.String propertyId,
               java.lang.Object value)
                 throws org.xml.sax.SAXNotRecognizedException,
                        org.xml.sax.SAXNotSupportedException
propertyId - The unique identifier (URI) of the property
                   being set.value - The value to which the property is being set.org.xml.sax.SAXNotRecognizedException - If the
            requested property is not known.org.xml.sax.SAXNotSupportedException - If the
            requested property is known, but the requested
            value is not supported.public java.lang.Object getProperty(java.lang.String propertyId)
                             throws org.xml.sax.SAXNotRecognizedException,
                                    org.xml.sax.SAXNotSupportedException
propertyId - The unique identifier (URI) of the property
                   being set.org.xml.sax.SAXNotRecognizedException - If the
            requested property is not known.org.xml.sax.SAXNotSupportedException - If the
            requested property is known but not supported.public org.apache.xerces.xni.parser.XMLParserConfiguration getXMLParserConfiguration()
Copyright © 1999-2022 The Apache Software Foundation. All Rights Reserved.