org.apache.xerces.parsers
Class DOMParserImpl
- org.w3c.dom.DOMConfiguration, org.w3c.dom.ls.LSParser, org.apache.xerces.xni.XMLDocumentHandler, org.apache.xerces.xni.XMLDTDContentModelHandler, org.apache.xerces.xni.XMLDTDHandler
public class DOMParserImpl
implements org.w3c.dom.ls.LSParser, org.w3c.dom.DOMConfiguration
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.
$Id: DOMParserImpl.java 443059 2006-09-13 18:26:56Z mrglavas $- Pavani Mukthipudi, Sun Microsystems Inc.
- Elena Litani, IBM
- Rahul Srivastava, Sun Microsystems Inc.
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 , INCLUDE_COMMENTS_FEATURE , INCLUDE_IGNORABLE_WHITESPACE , NAMESPACES , PSVI_DOCUMENT_CLASS_NAME , abort , fBaseURIStack , fCreateCDATANodes , fCreateEntityRefNodes , fCurrentCDATASection , fCurrentCDATASectionIndex , fCurrentEntityDecl , fCurrentNode , fCurrentNodeIndex , fDOMFilter , fDeferNodeExpansion , fDeferredDocumentImpl , fDeferredEntityDecl , fDocument , fDocumentClassName , fDocumentImpl , fDocumentIndex , fDocumentType , fDocumentTypeIndex , fErrorHandler , fFilterReject , fFirstChunk , fInCDATASection , fInDTD , fInDTDExternalSubset , fInEntityRef , fIncludeComments , fIncludeIgnorableWhitespace , fInternalSubset , fNamespaceAware , fRejectedElement , fRoot , fSkippedElemStack , fStorePSVI , fStringBuffer |
DOMParserImpl(String configuration, String schemaType) - Constructs a DOM Builder using the standard parser configuration.
|
DOMParserImpl(SymbolTable symbolTable) - Constructs a DOM Builder using the specified symbol table.
|
DOMParserImpl(SymbolTable symbolTable, org.apache.xerces.xni.grammars.XMLGrammarPool grammarPool) - Constructs a DOM Builder using the specified symbol table and
grammar pool.
|
DOMParserImpl(org.apache.xerces.xni.parser.XMLParserConfiguration config) - Constructs a DOM Builder using the specified parser configuration.
|
void | abort()
|
boolean | canSetParameter(String name, Object value)
|
boolean | getAsync()
|
boolean | getBusy()
|
org.w3c.dom.DOMConfiguration | getDomConfig()
|
org.w3c.dom.ls.LSParserFilter | 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.
|
Object | getParameter(String name) - Look up the value of a feature or a property.
|
org.w3c.dom.DOMStringList | getParameterNames() - DOM Level 3 CR - Experimental.
|
org.w3c.dom.Document | parse(org.w3c.dom.ls.LSInput is) - Parse an XML document from a resource identified by an
LSInput .
|
org.w3c.dom.Document | parseURI(String uri) - Parse an XML document from a location identified by an URI reference.
|
org.w3c.dom.Node | parseWithContext(org.w3c.dom.ls.LSInput is, org.w3c.dom.Node cnode, short action) - 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.
|
void | reset() - Resets the parser state.
|
void | setFilter(org.w3c.dom.ls.LSParserFilter filter) - When the application provides a filter, the parser will call out to
the filter at the completion of the construction of each
Element node.
|
void | setParameter(String name, Object value) - Set parameters and properties
|
void | startElement(org.apache.xerces.xni.QName element, org.apache.xerces.xni.XMLAttributes attributes, org.apache.xerces.xni.Augmentations augs) - The start of an element.
|
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 |
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 |
DEBUG
protected static final boolean DEBUG
DISALLOW_DOCTYPE_DECL_FEATURE
protected static final String DISALLOW_DOCTYPE_DECL_FEATURE
Feature identifier: disallow docType Decls.
DYNAMIC_VALIDATION
protected static final String DYNAMIC_VALIDATION
Dynamic validation
NAMESPACES
protected static final String NAMESPACES
Feature identifier: namespaces.
NORMALIZE_DATA
protected static final String NORMALIZE_DATA
Feature identifier: expose schema normalized value
PSVI_AUGMENT
protected static final String PSVI_AUGMENT
SYMBOL_TABLE
protected static final String SYMBOL_TABLE
VALIDATION_FEATURE
protected static final String VALIDATION_FEATURE
Feature id: validation.
XMLSCHEMA
protected static final String XMLSCHEMA
XML Schema validation
XMLSCHEMA_FULL_CHECKING
protected static final String XMLSCHEMA_FULL_CHECKING
XML Schema full checking
fBusy
protected boolean fBusy
fNamespaceDeclarations
protected boolean fNamespaceDeclarations
Include namespace declaration attributes in the document. *
fSchemaType
protected String fSchemaType
DOMParserImpl
public DOMParserImpl(String configuration,
String schemaType)
Constructs a DOM Builder using the standard parser configuration.
DOMParserImpl
public DOMParserImpl(SymbolTable symbolTable)
Constructs a DOM Builder using the specified symbol table.
DOMParserImpl
public DOMParserImpl(SymbolTable symbolTable,
org.apache.xerces.xni.grammars.XMLGrammarPool grammarPool)
Constructs a DOM Builder using the specified symbol table and
grammar pool.
DOMParserImpl
public DOMParserImpl(org.apache.xerces.xni.parser.XMLParserConfiguration config)
Constructs a DOM Builder using the specified parser configuration.
canSetParameter
public boolean canSetParameter(String name,
Object value)
- canSetParameter in interface org.w3c.dom.DOMConfiguration
getAsync
public boolean getAsync()
- getAsync in interface org.w3c.dom.ls.LSParser
org.w3c.dom.ls.LSParser.getAsync()
getBusy
public boolean getBusy()
- getBusy in interface org.w3c.dom.ls.LSParser
org.w3c.dom.ls.LSParser.getBusy()
getDomConfig
public org.w3c.dom.DOMConfiguration getDomConfig()
- getDomConfig in interface org.w3c.dom.ls.LSParser
getFilter
public org.w3c.dom.ls.LSParserFilter 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. The filter implementation can choose to
remove the element from the document being constructed (unless the
element is the document element) or to terminate the parse early. If
the document is being validated when it's loaded the validation
happens before the filter is called.
- getFilter in interface org.w3c.dom.ls.LSParser
getParameter
public Object getParameter(String name)
throws org.w3c.dom.DOMException
Look up the value of a feature or a property.
- getParameter in interface org.w3c.dom.DOMConfiguration
getParameterNames
public org.w3c.dom.DOMStringList getParameterNames()
DOM Level 3 CR - Experimental.
The list of the parameters supported by this
DOMConfiguration
object and for which at least one value
can be set by the application. Note that this list can also contain
parameter names defined outside this specification.
- getParameterNames in interface org.w3c.dom.DOMConfiguration
parse
public org.w3c.dom.Document parse(org.w3c.dom.ls.LSInput is)
throws org.w3c.dom.ls.LSException
Parse an XML document from a resource identified by an
LSInput
.
- parse in interface org.w3c.dom.ls.LSParser
parseURI
public org.w3c.dom.Document parseURI(String uri)
throws org.w3c.dom.ls.LSException
Parse an XML document from a location identified by an URI reference.
If the URI contains a fragment identifier (see section 4.1 in ), the
behavior is not defined by this specification.
- parseURI in interface org.w3c.dom.ls.LSParser
parseWithContext
public org.w3c.dom.Node parseWithContext(org.w3c.dom.ls.LSInput is,
org.w3c.dom.Node cnode,
short action)
throws org.w3c.dom.DOMException,
org.w3c.dom.ls.LSException
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. When parsing the input stream the
context node is used for resolving unbound namespace prefixes.
- parseWithContext in interface org.w3c.dom.ls.LSParser
is
- The LSInput
from which the source
document is to be read.cnode
- The Node
that is used as the context for
the data that is being parsed.action
- 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.
org.w3c.dom.DOMException
- HIERARCHY_REQUEST_ERR: Thrown if this action results in an invalid
hierarchy (i.e. a Document with more than one document element).
setFilter
public void setFilter(org.w3c.dom.ls.LSParserFilter filter)
When the application provides a filter, the parser will call out to
the filter at the completion of the construction of each
Element
node. The filter implementation can choose to
remove the element from the document being constructed (unless the
element is the document element) or to terminate the parse early. If
the document is being validated when it's loaded the validation
happens before the filter is called.
- setFilter in interface org.w3c.dom.ls.LSParser
setParameter
public void setParameter(String name,
Object value)
throws org.w3c.dom.DOMException
Set parameters and properties
- setParameter in interface org.w3c.dom.DOMConfiguration
startElement
public void startElement(org.apache.xerces.xni.QName element,
org.apache.xerces.xni.XMLAttributes attributes,
org.apache.xerces.xni.Augmentations augs)
The start of an element. If the document specifies the start element
by using an empty tag, then the startElement method will immediately
be followed by the endElement method, with no intervening methods.
Overriding the parent to handle DOM_NAMESPACE_DECLARATIONS=false.
- startElement in interface org.apache.xerces.xni.XMLDocumentHandler
- startElement in interface AbstractDOMParser
element
- The name of the element.attributes
- The element attributes.augs
- Additional information that may include infoset augmentations
Copyright B) 1999-2006 The Apache Software Foundation. All Rights Reserved.