Top Description Inners Fields Constructors Methods
org.apache.xerces.parsers

public Class DOMParserImpl

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

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.
Version
$Id: DOMParserImpl.java 784915 2009-06-15 18:54:11Z knoaman $

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
pack-priv static 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 boolean
private DOMStringList
private String
protected String
protected static final String
HONOUR_ALL_SCHEMALOCATIONS

Feature identifier: honour all schemaLocations

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 org.apache.xerces.parsers.AbstractDOMParser:
CORE_DOCUMENT_CLASS_NAMECREATE_CDATA_NODES_FEATURECREATE_ENTITY_REF_NODESCURRENT_ELEMENT_NODEDEFAULT_DOCUMENT_CLASS_NAMEDEFER_NODE_EXPANSIONDOCUMENT_CLASS_NAMEfBaseURIStackfCreateCDATANodesfCreateEntityRefNodesfCurrentCDATASectionfCurrentCDATASectionIndexfCurrentEntityDeclfCurrentNodefCurrentNodeIndexfDeferNodeExpansionfDeferredDocumentImplfDeferredEntityDeclfDocumentfDocumentClassNamefDocumentImplfDocumentIndexfDocumentTypefDocumentTypeIndexfDOMFilterfErrorHandlerfFilterRejectfFirstChunkfInCDATASectionfIncludeCommentsfIncludeIgnorableWhitespacefInDTDfInDTDExternalSubsetfInEntityReffInternalSubsetfNamespaceAwarefRejectedElementDepthfRootfSkippedElemStackfStorePSVIfStringBufferINCLUDE_COMMENTS_FEATUREINCLUDE_IGNORABLE_WHITESPACEPSVI_DOCUMENT_CLASS_NAME

Constructor Summary

AccessConstructor and Description
public
DOMParserImpl(String configuration, 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 org.apache.xerces.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
The name of the parameter to check.
name
,
Object
An object. if null, the returned value is true.
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 a filter is provided, the implementation will call out to the filter as it is constructing the DOM tree structure.
public Object
getParameter(String
The name of the parameter.
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
private static DOMException
private static DOMException
public Document
parse(LSInput
The LSInput from which the source of the document is to be read.
is
)

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

Parse an XML document from a resource identified by an LSInput.
public Document
parseURI(String
The location of the XML document to be read.
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
reset()

Overrides org.apache.xerces.parsers.AbstractDOMParser.reset.

Resets the parser state.
private void
public void
setFilter(LSParserFilter filter)

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

When a filter is provided, the implementation will call out to the filter as it is constructing the DOM tree structure.
public void
setParameter(String
The name of the parameter to set.
name
,
Object
The new value or null if the user wishes to unset the parameter. While the type of the value parameter is defined as DOMUserData, the object type must match the type defined by the definition of the parameter. For example, if the parameter is "error-handler", the value must be of type DOMErrorHandler.
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 org.apache.xerces.parsers.AbstractDOMParser.startElement.

Implements org.apache.xerces.xni.XMLDocumentHandler.startElement.

The start of an element.
Inherited from org.apache.xerces.parsers.AbstractDOMParser:
attributeDeclcharacterscommentcreateAttrNodecreateElementNodedoctypeDecldropDocumentReferenceselementDeclemptyElementendAttlistendCDATAendConditionalendDocumentendDTDendElementendExternalSubsetendGeneralEntityendParameterEntityexternalEntityDeclgetDocumentgetDocumentClassNamehandleBaseURIhandleBaseURIignorableWhitespaceignoredCharactersinternalEntityDeclnotationDeclprocessingInstructionsetCharacterDatasetDocumentClassNamesetLocalestartAttliststartCDATAstartConditionalstartDocumentstartDTDstartExternalSubsetstartGeneralEntitystartParameterEntitytextDeclunparsedEntityDeclxmlDecl