APIdia Launch Partner
Top Description Inners Fields Constructors Methods
com.sun.org.apache.xerces.internal.parsers

public Class DOMParserImpl

extends AbstractDOMParser
implements LSParser, DOMConfiguration
Class Inheritance
All Implemented Interfaces
org.w3c.dom.DOMConfiguration, org.w3c.dom.ls.LSParser
Imports
com.sun.org.apache.xerces.internal.dom.DOMErrorImpl, .DOMMessageFormatter, .DOMStringListImpl, com.sun.org.apache.xerces.internal.impl.Constants, com.sun.org.apache.xerces.internal.util.DOMEntityResolverWrapper, .DOMErrorHandlerWrapper, .DOMUtil, .SymbolTable, .XMLSymbols, com.sun.org.apache.xerces.internal.xni.Augmentations, .NamespaceContext, .QName, .XMLAttributes, .XMLDTDContentModelHandler, .XMLDTDHandler, .XMLDocumentHandler, .XMLLocator, .XMLResourceIdentifier, .XMLString, .XNIException, com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarPool, com.sun.org.apache.xerces.internal.xni.parser.XMLConfigurationException, .XMLDTDContentModelSource, .XMLDTDSource, .XMLDocumentSource, .XMLEntityResolver, .XMLInputSource, .XMLParseException, .XMLParserConfiguration, java.io.StringReader, java.util.ArrayList, .List, .Locale, .Stack, .StringTokenizer, org.w3c.dom.DOMConfiguration, .DOMError, .DOMErrorHandler, .DOMException, .DOMStringList, .Document, .Node, org.w3c.dom.ls.LSException, .LSInput, .LSParser, .LSParserFilter, .LSResourceResolver, org.xml.sax.SAXException

This is Xerces DOM Builder class. It uses the abstract DOM parser with a document scanner, a dtd scanner, and a validator, as well as a grammar pool.
Authors
Pavani Mukthipudi, Sun Microsystems Inc., Elena Litani, IBM, Rahul Srivastava, Sun Microsystems Inc.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class

Field Summary

Modifier and TypeField and Description
private DOMParserImpl.AbortHandler
private boolean
private Thread
protected static final boolean
protected static final String
DISALLOW_DOCTYPE_DECL_FEATURE

Feature identifier: disallow docType Decls.

protected static final String
DYNAMIC_VALIDATION

Dynamic validation

protected boolean
protected boolean
fNamespaceDeclarations

Include namespace declaration attributes in the document.

private DOMStringList
private String
protected String
protected static final String
NAMESPACE_GROWTH

Feature identifier: namespace growth

protected static final String
protected static final String
NORMALIZE_DATA

Feature identifier: expose schema normalized value

protected static final String
protected static final String
protected static final String
TOLERATE_DUPLICATES

Feature identifier: tolerate duplicates

protected static final String
VALIDATION_FEATURE

Feature id: validation.

protected static final String
XMLSCHEMA

XML Schema validation

protected static final String
XMLSCHEMA_FULL_CHECKING

XML Schema full checking

Inherited from com.sun.org.apache.xerces.internal.parsers.AbstractDOMParser:
CORE_DOCUMENT_CLASS_NAMECREATE_CDATA_NODES_FEATURECREATE_ENTITY_REF_NODESCURRENT_ELEMENT_NODEDEFAULT_DOCUMENT_CLASS_NAMEDEFER_NODE_EXPANSIONDOCUMENT_CLASS_NAMEfBaseURIStackfCreateCDATANodesfCreateEntityRefNodesfCurrentCDATASectionfCurrentCDATASectionIndexfCurrentEntityDeclfCurrentNodefCurrentNodeIndexfDeferNodeExpansionfDeferredDocumentImplfDeferredEntityDeclfDocumentfDocumentClassNamefDocumentImplfDocumentIndexfDocumentTypefDocumentTypeIndexfDOMFilterfErrorHandlerfFilterRejectfFirstChunkfInCDATASectionfIncludeCommentsfIncludeIgnorableWhitespacefInDTDfInDTDExternalSubsetfInEntityReffInternalSubsetfNamespaceAwarefRejectedElementDepthfRootfSkippedElemStackfStorePSVIfStringBuilderINCLUDE_COMMENTS_FEATUREINCLUDE_IGNORABLE_WHITESPACEPSVI_DOCUMENT_CLASS_NAME

Constructor Summary

AccessConstructor and Description
public
DOMParserImpl(XMLParserConfiguration config, String schemaType)

Constructs a DOM Builder using the standard parser configuration.

public
DOMParserImpl(XMLParserConfiguration config)

Constructs a DOM Builder using the specified parser configuration.

public
DOMParserImpl(SymbolTable symbolTable)

Constructs a DOM Builder using the specified symbol table.

public
DOMParserImpl(SymbolTable symbolTable, XMLGrammarPool grammarPool)

Constructs a DOM Builder using the specified symbol table and grammar pool.

Method Summary

Modifier and TypeMethod and Description
public void
abort()

Overrides com.sun.org.apache.xerces.internal.parsers.AbstractDOMParser.abort.

Implements org.w3c.dom.ls.LSParser.abort.

Abort the loading of the document that is currently being loaded by the LSParser.

public boolean
canSetParameter(String name, Object value)

Implements org.w3c.dom.DOMConfiguration.canSetParameter.

Check if setting a parameter to a specific value is supported.

pack-priv XMLInputSource
dom2xmlInputSource(LSInput is)

NON-DOM: convert LSInput to XNIInputSource

public boolean
getAsync()

Implements org.w3c.dom.ls.LSParser.getAsync.

true if the LSParser is asynchronous, false if it is synchronous.

public boolean
getBusy()

Implements org.w3c.dom.ls.LSParser.getBusy.

true if the LSParser is currently busy loading a document, otherwise false.

public DOMConfiguration
getDomConfig()

Implements org.w3c.dom.ls.LSParser.getDomConfig.

The DOMConfiguration object used when parsing an input source.

public LSParserFilter
getFilter()

Implements org.w3c.dom.ls.LSParser.getFilter.

When the application provides a filter, the parser will call out to the filter at the completion of the construction of each Element node.

public Object
getParameter(String name)

Implements org.w3c.dom.DOMConfiguration.getParameter.

Look up the value of a feature or a property.

public DOMStringList
getParameterNames()

Implements org.w3c.dom.DOMConfiguration.getParameterNames.

DOM Level 3 CR - Experimental.

private static DOMException
private static DOMException
public Document
parse(LSInput is)

Implements org.w3c.dom.ls.LSParser.parse.

Parse an XML document from a resource identified by an LSInput.

public Document
parseURI(String uri)

Implements org.w3c.dom.ls.LSParser.parseURI.

Parse an XML document from a location identified by an URI reference.

public Node
parseWithContext(LSInput
The LSInput from which the source document is to be read.
is
,
Node
The Node that is used as the context for the data that is being parsed.
cnode
,
short
This parameter describes which action should be taken between the new set of node being inserted and the existing children of the context node. The set of possible actions is defined above.
action
)

Implements org.w3c.dom.ls.LSParser.parseWithContext.

Parse an XML document or fragment from a resource identified by an LSInput and insert the content into an existing document at the position epcified with the contextNode and action arguments.

public void
private void
public void
setFilter(LSParserFilter filter)

Implements org.w3c.dom.ls.LSParser.setFilter.

When the application provides a filter, the parser will call out to the filter at the completion of the construction of each Element node.

public void
setParameter(String name, Object value)

Implements org.w3c.dom.DOMConfiguration.setParameter.

Set parameters and properties

public void
startElement(QName
The name of the element.
element
,
XMLAttributes
The element attributes.
attributes
,
Augmentations
Additional information that may include infoset augmentations
augs
)

Overrides com.sun.org.apache.xerces.internal.parsers.AbstractDOMParser.startElement.

Implements com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler.startElement.

The start of an element.

Inherited from com.sun.org.apache.xerces.internal.parsers.AbstractDOMParser:
attributeDeclcharacterscommentcreateAttrNodecreateElementNodedoctypeDecldropDocumentReferenceselementDeclemptyElementendAttlistendCDATAendConditionalendDocumentendDTDendElementendExternalSubsetendGeneralEntityendParameterEntityexternalEntityDeclgetDocumentgetDocumentClassNamehandleBaseURIhandleBaseURIignorableWhitespaceignoredCharactersinternalEntityDeclnotationDeclprocessingInstructionsetCharacterDatasetDocumentClassNamesetLocalestartAttliststartCDATAstartConditionalstartDocumentstartDTDstartExternalSubsetstartGeneralEntitystartParameterEntitytextDeclunparsedEntityDeclxmlDecl