Home » Xerces-J-src.2.9.1 » org.apache.xerces » parsers » [javadoc | source]
org.apache.xerces.parsers
public class: DOMParser [javadoc | source]
java.lang.Object
   org.apache.xerces.parsers.XMLParser
      org.apache.xerces.parsers.AbstractXMLDocumentParser
         org.apache.xerces.parsers.AbstractDOMParser
            org.apache.xerces.parsers.DOMParser

All Implemented Interfaces:
    XMLDocumentHandler, XMLDTDContentModelHandler, XMLDTDHandler

Direct Known Subclasses:
    DOMAddLines, DOMParserSaveEncoding, RevalidatingDOMParser

This is the main Xerces DOM parser class. It uses the abstract DOM parser with a document scanner, a dtd scanner, and a validator, as well as a grammar pool.
Field Summary
protected static final  String USE_ENTITY_RESOLVER2    Feature identifier: EntityResolver2. 
protected static final  String SYMBOL_TABLE    Property identifier: symbol table. 
protected static final  String XMLGRAMMAR_POOL    Property identifier: XML grammar pool. 
protected  boolean fUseEntityResolver2    Use EntityResolver2. 
Fields inherited from org.apache.xerces.parsers.AbstractDOMParser:
NAMESPACES,  CREATE_ENTITY_REF_NODES,  INCLUDE_COMMENTS_FEATURE,  CREATE_CDATA_NODES_FEATURE,  INCLUDE_IGNORABLE_WHITESPACE,  DEFER_NODE_EXPANSION,  DOCUMENT_CLASS_NAME,  CURRENT_ELEMENT_NODE,  DEFAULT_DOCUMENT_CLASS_NAME,  CORE_DOCUMENT_CLASS_NAME,  PSVI_DOCUMENT_CLASS_NAME,  ABORT,  fErrorHandler,  fInDTD,  fCreateEntityRefNodes,  fIncludeIgnorableWhitespace,  fIncludeComments,  fCreateCDATANodes,  fDocument,  fDocumentImpl,  fStorePSVI,  fDocumentClassName,  fDocumentType,  fCurrentNode,  fCurrentCDATASection,  fCurrentEntityDecl,  fDeferredEntityDecl,  fStringBuffer,  fInternalSubset,  fDeferNodeExpansion,  fNamespaceAware,  fDeferredDocumentImpl,  fDocumentIndex,  fDocumentTypeIndex,  fCurrentNodeIndex,  fCurrentCDATASectionIndex,  fInDTDExternalSubset,  fRoot,  fInCDATASection,  fFirstChunk,  fFilterReject,  fBaseURIStack,  fRejectedElement,  fSkippedElemStack,  fInEntityRef,  fDOMFilter
Fields inherited from org.apache.xerces.parsers.AbstractXMLDocumentParser:
fInDTD,  fDocumentSource,  fDTDSource,  fDTDContentModelSource
Fields inherited from org.apache.xerces.parsers.XMLParser:
ENTITY_RESOLVER,  ERROR_HANDLER,  fConfiguration
Constructor:
 public DOMParser() 
 public DOMParser(XMLParserConfiguration config) 
    Constructs a DOM parser using the specified parser configuration.
 public DOMParser(SymbolTable symbolTable) 
    Constructs a DOM parser using the specified symbol table.
 public DOMParser(SymbolTable symbolTable,
    XMLGrammarPool grammarPool) 
    Constructs a DOM parser using the specified symbol table and grammar pool.
Method from org.apache.xerces.parsers.DOMParser Summary:
getEntityResolver,   getErrorHandler,   getFeature,   getProperty,   getXMLParserConfiguration,   parse,   parse,   setEntityResolver,   setErrorHandler,   setFeature,   setProperty
Methods from org.apache.xerces.parsers.AbstractDOMParser:
abort,   attributeDecl,   characters,   comment,   createAttrNode,   createElementNode,   doctypeDecl,   dropDocumentReferences,   elementDecl,   emptyElement,   endAttlist,   endCDATA,   endConditional,   endDTD,   endDocument,   endElement,   endExternalSubset,   endGeneralEntity,   endParameterEntity,   externalEntityDecl,   getDocument,   getDocumentClassName,   handleBaseURI,   handleBaseURI,   ignorableWhitespace,   ignoredCharacters,   internalEntityDecl,   notationDecl,   processingInstruction,   reset,   setCharacterData,   setDocumentClassName,   setLocale,   startAttlist,   startCDATA,   startConditional,   startDTD,   startDocument,   startElement,   startExternalSubset,   startGeneralEntity,   startParameterEntity,   textDecl,   unparsedEntityDecl,   xmlDecl
Methods from org.apache.xerces.parsers.AbstractXMLDocumentParser:
any,   attributeDecl,   characters,   comment,   doctypeDecl,   element,   elementDecl,   empty,   emptyElement,   endAttlist,   endCDATA,   endConditional,   endContentModel,   endDTD,   endDocument,   endElement,   endExternalSubset,   endGeneralEntity,   endGroup,   endParameterEntity,   externalEntityDecl,   getDTDContentModelSource,   getDTDSource,   getDocumentSource,   ignorableWhitespace,   ignoredCharacters,   internalEntityDecl,   notationDecl,   occurrence,   pcdata,   processingInstruction,   reset,   separator,   setDTDContentModelSource,   setDTDSource,   setDocumentSource,   startAttlist,   startCDATA,   startConditional,   startContentModel,   startDTD,   startDocument,   startElement,   startExternalSubset,   startGeneralEntity,   startGroup,   startParameterEntity,   textDecl,   unparsedEntityDecl,   xmlDecl
Methods from org.apache.xerces.parsers.XMLParser:
parse,   reset
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.xerces.parsers.DOMParser Detail:
 public EntityResolver getEntityResolver() 
    Return the current entity resolver.
 public ErrorHandler getErrorHandler() 
    Return the current error handler.
 public boolean getFeature(String featureId) throws SAXNotSupportedException, SAXNotRecognizedException 
    Query the state of a feature. Query the current state of any feature in a SAX2 parser. The parser might not recognize the feature.
 public Object getProperty(String propertyId) throws SAXNotSupportedException, SAXNotRecognizedException 
    Query the value of a property. Return the current value of a property in a SAX2 parser. The parser might not recognize the property.
 public XMLParserConfiguration getXMLParserConfiguration() 
    Returns this parser's XMLParserConfiguration.
 public  void parse(String systemId) throws IOException, SAXException 
    Parses the input source specified by the given system identifier.

    This method is equivalent to the following:

    parse(new InputSource(systemId));
    
 public  void parse(InputSource inputSource) throws IOException, SAXException 
    parse
 public  void setEntityResolver(EntityResolver resolver) 
    Sets the resolver used to resolve external entities. The EntityResolver interface supports resolution of public and system identifiers.
 public  void setErrorHandler(ErrorHandler errorHandler) 
    Allow an application to register an error event handler.

    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.

 public  void setFeature(String featureId,
    boolean state) throws SAXNotSupportedException, SAXNotRecognizedException 
    Set the state of any feature in a SAX2 parser. The parser might not recognize the feature, and if it does recognize it, it might not be able to fulfill the request.
 public  void setProperty(String propertyId,
    Object value) throws SAXNotSupportedException, SAXNotRecognizedException 
    Set the value of any property in a SAX2 parser. The parser might not recognize the property, and if it does recognize it, it might not support the requested value.