| java.lang.Object org.apache.xerces.framework.XMLParser org.apache.xerces.parsers.DOMParser
DOMParser | public class DOMParser extends XMLParser implements XMLDocumentHandler(Code) | | DOMParser provides a parser which produces a W3C DOM tree as its output
version: $Id: DOMParser.java,v 1.51 2001/07/09 19:29:09 sandygao Exp $ |
Constructor Summary | |
public | DOMParser() Default constructor. |
Method Summary | |
public void | attlistDecl(QName elementDecl, QName attributeDecl, int attType, boolean attList, String enumString, int attDefaultType, int attDefaultValue) | public void | characters(int dataIndex) Characters. | public void | characters(char ch, int start, int length) | public void | comment(int dataIndex) Comment. | public void | elementDecl(QName elementDecl, int contentSpecType, int contentSpecIndex, XMLContentSpec.Provider contentSpecProvider) | public void | endCDATA() End CDATA section. | public void | endDTD() This function will be called at the end of the DTD. | public void | endDocument() End document. | public void | endElement(QName elementQName) End element. | public void | endEntityReference(int entityName, int entityType, int entityContext) End entity reference. | public void | endNamespaceDeclScope(int prefix) Report the end of the scope of a namespace declaration. | public void | externalEntityDecl(int entityNameIndex, int publicIdIndex, int systemIdIndex) | public void | externalPEDecl(int entityNameIndex, int publicIdIndex, int systemIdIndex) | public boolean | getCreateEntityReferenceNodes() Returns true if entity references within the document are
included in the document tree as EntityReference nodes. | protected Element | getCurrentElementNode() Returns the current element node. | protected boolean | getDeferNodeExpansion() Returns true if the expansion of the nodes in the default DOM
implementation are deferred. | public Document | getDocument() Returns the document. | protected String | getDocumentClassName() Returns the fully qualified class name of the document factory
used when constructing the DOM tree. | public boolean | getFeature(String featureId) Query the current state of any feature in a SAX2 parser. | public String[] | getFeaturesRecognized() Returns a list of features that this parser recognizes. | public boolean | getIncludeIgnorableWhitespace() Returns true if ignorable whitespace text nodes are included
in the DOM tree. | public String[] | getPropertiesRecognized() Returns a list of properties that this parser recognizes. | public Object | getProperty(String propertyId) Return the current value of a property in a SAX2 parser.
The parser might not recognize the property.
Parameters: propertyId - The unique identifier (URI) of the propertybeing set. | public void | ignorableWhitespace(int dataIndex) Ignorable whitespace. | public void | ignorableWhitespace(char ch, int start, int length) Not called. | protected void | init() Initializes the parser to a pre-parse state. | public void | internalEntityDecl(int entityNameIndex, int entityValueIndex) | public void | internalPEDecl(int entityNameIndex, int entityValueIndex) | public void | internalSubset(int internalSubset) Supports DOM Level 2 internalSubset additions. | public void | notationDecl(int notationNameIndex, int publicIdIndex, int systemIdIndex) | public void | processingInstruction(int targetIndex, int dataIndex) Processing instruction. | public void | reset() Resets the parser. | public void | resetOrCopy() Resets or copies the parser. | protected void | setCreateEntityReferenceNodes(boolean create) This feature determines whether entity references within
the document are included in the document tree as
EntityReference nodes.
Note: The children of the entity reference are always
added to the document. | protected void | setDeferNodeExpansion(boolean deferNodeExpansion) This method sets whether the expansion of the nodes in the default
DOM implementation are deferred. | protected void | setDocumentClassName(String documentClassName) This method allows the programmer to decide which document
factory to use when constructing the DOM tree. | public void | setFeature(String featureId, boolean state) Set the state of any feature in a SAX2 parser. | public void | setIncludeIgnorableWhitespace(boolean include) This feature determines whether text nodes that can be
considered "ignorable whitespace" are included in the DOM
tree.
Note: The only way that the parser can determine if text
is ignorable is by reading the associated grammar
and having a content model for the document. | public void | setProperty(String propertyId, Object value) Set the value of any property in a SAX2 parser. | public void | startCDATA() Start CDATA section. | public void | startDTD(QName rootElement, int publicId, int systemId) This function will be called when a <!DOCTYPE...> declaration is
encountered. | public void | startDocument() Start document. | public void | startElement(QName elementQName, XMLAttrList xmlAttrList, int attrListIndex) Start element. | public void | startEntityReference(int entityName, int entityType, int entityContext) Start entity reference. | public void | startNamespaceDeclScope(int prefix, int uri) Report the start of the scope of a namespace declaration. | public void | textDecl(int versionIndex, int encodingIndex) Text declaration. | public void | unparsedEntityDecl(int entityNameIndex, int publicIdIndex, int systemIdIndex, int notationNameIndex) | public void | xmlDecl(int versionIndex, int encodingIndex, int standaloneIndex) XML declaration. |
DEFAULT_DEFERRED_DOCUMENT_CLASS_NAME | final public static String DEFAULT_DEFERRED_DOCUMENT_CLASS_NAME(Code) | | Default deferred document class name (org.apache.xerces.dom.DeferredDocumentImpl).
|
DEFAULT_DOCUMENT_CLASS_NAME | final public static String DEFAULT_DOCUMENT_CLASS_NAME(Code) | | Default programmatic document class name (org.apache.xerces.dom.DocumentImpl).
|
fAmpIndex | protected int fAmpIndex(Code) | | |
fAposIndex | protected int fAposIndex(Code) | | |
fCurrentElementNode | protected Node fCurrentElementNode(Code) | | |
fCurrentEntityName | protected int fCurrentEntityName(Code) | | |
fCurrentEntityNode | protected int fCurrentEntityNode(Code) | | |
fCurrentNodeIndex | protected int fCurrentNodeIndex(Code) | | |
fDocumentIndex | protected int fDocumentIndex(Code) | | |
fDocumentTypeIndex | protected int fDocumentTypeIndex(Code) | | |
fGtIndex | protected int fGtIndex(Code) | | |
fInCDATA | protected boolean fInCDATA(Code) | | |
fInDTD | protected boolean fInDTD(Code) | | |
fLtIndex | protected int fLtIndex(Code) | | |
fQuotIndex | protected int fQuotIndex(Code) | | |
fWithinElement | protected boolean fWithinElement(Code) | | |
DOMParser | public DOMParser()(Code) | | Default constructor.
|
attlistDecl | public void attlistDecl(QName elementDecl, QName attributeDecl, int attType, boolean attList, String enumString, int attDefaultType, int attDefaultValue) throws Exception(Code) | | <!ATTLIST Name AttDef>
|
characters | public void characters(int dataIndex) throws Exception(Code) | | Characters.
|
characters | public void characters(char ch, int start, int length) throws Exception(Code) | | |
endDTD | public void endDTD() throws Exception(Code) | | This function will be called at the end of the DTD.
|
endEntityReference | public void endEntityReference(int entityName, int entityType, int entityContext) throws Exception(Code) | | End entity reference.
|
endNamespaceDeclScope | public void endNamespaceDeclScope(int prefix) throws Exception(Code) | | Report the end of the scope of a namespace declaration.
|
externalEntityDecl | public void externalEntityDecl(int entityNameIndex, int publicIdIndex, int systemIdIndex) throws Exception(Code) | | <!ENTITY Name ExternalID> (external)
|
externalPEDecl | public void externalPEDecl(int entityNameIndex, int publicIdIndex, int systemIdIndex) throws Exception(Code) | | <!ENTITY % Name ExternalID> (external)
|
ignorableWhitespace | public void ignorableWhitespace(int dataIndex) throws Exception(Code) | | Ignorable whitespace.
|
ignorableWhitespace | public void ignorableWhitespace(char ch, int start, int length) throws Exception(Code) | | Not called.
|
init | protected void init()(Code) | | Initializes the parser to a pre-parse state. This method is
called between calls to parse() .
|
internalEntityDecl | public void internalEntityDecl(int entityNameIndex, int entityValueIndex) throws Exception(Code) | | <!ENTITY Name EntityValue> (internal)
|
internalPEDecl | public void internalPEDecl(int entityNameIndex, int entityValueIndex) throws Exception(Code) | | <!ENTITY % Name EntityValue> (internal)
|
internalSubset | public void internalSubset(int internalSubset)(Code) | | Supports DOM Level 2 internalSubset additions.
Called when the internal subset is completely scanned.
|
notationDecl | public void notationDecl(int notationNameIndex, int publicIdIndex, int systemIdIndex) throws Exception(Code) | | <!NOTATION Name ExternalId>
|
processingInstruction | public void processingInstruction(int targetIndex, int dataIndex) throws Exception(Code) | | Processing instruction.
|
resetOrCopy | public void resetOrCopy() throws Exception(Code) | | Resets or copies the parser.
|
setCreateEntityReferenceNodes | protected void setCreateEntityReferenceNodes(boolean create) throws SAXNotRecognizedException, SAXNotSupportedException(Code) | | This feature determines whether entity references within
the document are included in the document tree as
EntityReference nodes.
Note: The children of the entity reference are always
added to the document. This feature only affects
whether an EntityReference node is also included
as the parent of the entity reference children.
Parameters: create - True to create entity reference nodes; falseto only insert the entity reference children. See Also: DOMParser.getCreateEntityReferenceNodes |
setFeature | public void setFeature(String featureId, boolean state) throws SAXNotRecognizedException, SAXNotSupportedException(Code) | | 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.
Parameters: featureId - The unique identifier (URI) of the feature. Parameters: state - The requested state of the feature (true or false). exception: SAXNotRecognizedException - If the requested feature isnot known. exception: SAXNotSupportedException - If the requested feature isknown, but the requested stateis not supported. |
setIncludeIgnorableWhitespace | public void setIncludeIgnorableWhitespace(boolean include) throws SAXNotRecognizedException, SAXNotSupportedException(Code) | | This feature determines whether text nodes that can be
considered "ignorable whitespace" are included in the DOM
tree.
Note: The only way that the parser can determine if text
is ignorable is by reading the associated grammar
and having a content model for the document. When
ignorable whitespace text nodes *are* included in
the DOM tree, they will be flagged as ignorable.
The ignorable flag can be queried by calling the
TextImpl#isIgnorableWhitespace():boolean method.
Parameters: include - True to include ignorable whitespace text nodes;false to not include ignorable whitespace textnodes. See Also: DOMParser.getIncludeIgnorableWhitespace |
setProperty | public void setProperty(String propertyId, Object value) throws SAXNotRecognizedException, SAXNotSupportedException(Code) | | 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.
Parameters: propertyId - The unique identifier (URI) of the propertybeing set. Parameters: Object - The value to which the property is being set. exception: SAXNotRecognizedException - If the requested property isnot known. exception: SAXNotSupportedException - If the requested property isknown, but the requestedvalue is not supported. |
startCDATA | public void startCDATA() throws Exception(Code) | | Start CDATA section.
|
startDTD | public void startDTD(QName rootElement, int publicId, int systemId) throws Exception(Code) | | This function will be called when a <!DOCTYPE...> declaration is
encountered.
|
startDocument | public void startDocument()(Code) | | Start document.
|
startEntityReference | public void startEntityReference(int entityName, int entityType, int entityContext) throws Exception(Code) | | Start entity reference.
|
startNamespaceDeclScope | public void startNamespaceDeclScope(int prefix, int uri) throws Exception(Code) | | Report the start of the scope of a namespace declaration.
|
textDecl | public void textDecl(int versionIndex, int encodingIndex) throws Exception(Code) | | Text declaration.
added DOM Level 3 WD support - experimental
|
unparsedEntityDecl | public void unparsedEntityDecl(int entityNameIndex, int publicIdIndex, int systemIdIndex, int notationNameIndex) throws Exception(Code) | | <!ENTITY Name ExternalID NDataDecl> (unparsed)
|
xmlDecl | public void xmlDecl(int versionIndex, int encodingIndex, int standaloneIndex) throws Exception(Code) | | XML declaration.
|
Methods inherited from org.apache.xerces.framework.XMLParser | public void addRecognizer(XMLDeclRecognizer recognizer)(Code)(Java Doc) protected boolean getAllowJavaEncodings() throws SAXNotRecognizedException, SAXNotSupportedException(Code)(Java Doc) protected boolean getContinueAfterFatalError() throws SAXNotRecognizedException, SAXNotSupportedException(Code)(Java Doc) public EntityResolver getEntityResolver()(Code)(Java Doc) public ErrorHandler getErrorHandler()(Code)(Java Doc) protected boolean getExternalGeneralEntities() throws SAXNotRecognizedException, SAXNotSupportedException(Code)(Java Doc) protected boolean getExternalParameterEntities() throws SAXNotRecognizedException, SAXNotSupportedException(Code)(Java Doc) public boolean getFeature(String featureId) throws SAXNotRecognizedException, SAXNotSupportedException(Code)(Java Doc) public String[] getFeaturesRecognized()(Code)(Java Doc) protected boolean getLoadDTDGrammar() throws SAXNotRecognizedException, SAXNotSupportedException(Code)(Java Doc) protected boolean getLoadExternalDTD() throws SAXNotRecognizedException, SAXNotSupportedException(Code)(Java Doc) final public Locator getLocator()(Code)(Java Doc) protected boolean getNamespaces() throws SAXNotRecognizedException, SAXNotSupportedException(Code)(Java Doc) protected boolean getNormalizeContents()(Code)(Java Doc) public String[] getPropertiesRecognized()(Code)(Java Doc) public Object getProperty(String propertyId) throws SAXNotRecognizedException, SAXNotSupportedException(Code)(Java Doc) protected boolean getValidation() throws SAXNotRecognizedException, SAXNotSupportedException(Code)(Java Doc) protected boolean getValidationDynamic() throws SAXNotRecognizedException, SAXNotSupportedException(Code)(Java Doc) protected boolean getValidationSchema() throws SAXNotRecognizedException, SAXNotSupportedException(Code)(Java Doc) protected boolean getValidationSchemaFullChecking() throws SAXNotRecognizedException, SAXNotSupportedException(Code)(Java Doc) protected boolean getValidationWarnOnDuplicateAttdef() throws SAXNotRecognizedException, SAXNotSupportedException(Code)(Java Doc) protected boolean getValidationWarnOnUndeclaredElemdef() throws SAXNotRecognizedException, SAXNotSupportedException(Code)(Java Doc) protected String getXMLString() throws SAXNotRecognizedException, SAXNotSupportedException(Code)(Java Doc) final public Locale getfLocale()(Code)(Java Doc) final public XMLMessageProvider getfgDatatypeMessages()(Code)(Java Doc) final public XMLMessageProvider getfgImplementationMessages()(Code)(Java Doc) final public XMLMessageProvider getfgSchemaMessages()(Code)(Java Doc) final public XMLMessageProvider getfgXMLMessages()(Code)(Java Doc) protected void initHandlers(boolean sendCharDataAsCharArray, XMLDocumentHandler docHandler, XMLDocumentHandler.DTDHandler dtdHandler)(Code)(Java Doc) public boolean isFeatureRecognized(String featureId)(Code)(Java Doc) public boolean isPropertyRecognized(String propertyId)(Code)(Java Doc) public void parse(InputSource source) throws SAXException, IOException(Code)(Java Doc) public void parse(String systemId) throws SAXException, IOException(Code)(Java Doc) public boolean parseSome() throws Exception(Code)(Java Doc) public boolean parseSomeSetup(InputSource source) throws Exception(Code)(Java Doc) public void reportError(Locator locator, String errorDomain, int majorCode, int minorCode, Object args, int errorType) throws Exception(Code)(Java Doc) public void reset() throws Exception(Code)(Java Doc) protected void resetOrCopy() throws Exception(Code)(Java Doc) protected void setAllowJavaEncodings(boolean allow) throws SAXNotRecognizedException, SAXNotSupportedException(Code)(Java Doc) protected void setContinueAfterFatalError(boolean continueAfterFatalError) throws SAXNotRecognizedException, SAXNotSupportedException(Code)(Java Doc) public void setEntityResolver(EntityResolver resolver)(Code)(Java Doc) public void setErrorHandler(ErrorHandler handler)(Code)(Java Doc) protected void setExternalGeneralEntities(boolean expand) throws SAXNotRecognizedException, SAXNotSupportedException(Code)(Java Doc) protected void setExternalNoNamespaceSchemaLocation(Object value) throws SAXNotRecognizedException, SAXNotSupportedException(Code)(Java Doc) protected void setExternalParameterEntities(boolean expand) throws SAXNotRecognizedException, SAXNotSupportedException(Code)(Java Doc) protected void setExternalSchemaLocation(Object value) throws SAXNotRecognizedException, SAXNotSupportedException(Code)(Java Doc) public void setFeature(String featureId, boolean state) throws SAXNotRecognizedException, SAXNotSupportedException(Code)(Java Doc) protected void setLoadDTDGrammar(boolean loadDTDGrammar) throws SAXNotRecognizedException, SAXNotSupportedException(Code)(Java Doc) protected void setLoadExternalDTD(boolean loadExternalDTD) throws SAXNotRecognizedException, SAXNotSupportedException(Code)(Java Doc) public void setLocale(Locale locale) throws SAXException(Code)(Java Doc) protected void setNamespaces(boolean process) throws SAXNotRecognizedException, SAXNotSupportedException(Code)(Java Doc) protected void setNormalizeAttributeValues(boolean normalize)(Code)(Java Doc) protected void setNormalizeContents(boolean normalize)(Code)(Java Doc) public void setProperty(String propertyId, Object value) throws SAXNotRecognizedException, SAXNotSupportedException(Code)(Java Doc) public void setReaderFactory(XMLEntityReaderFactory readerFactory)(Code)(Java Doc) protected void setValidation(boolean validate) throws SAXNotRecognizedException, SAXNotSupportedException(Code)(Java Doc) protected void setValidationDynamic(boolean dynamic) throws SAXNotRecognizedException, SAXNotSupportedException(Code)(Java Doc) protected void setValidationSchema(boolean schema) throws SAXNotRecognizedException, SAXNotSupportedException(Code)(Java Doc) protected void setValidationSchemaFullChecking(boolean schemaFullChecking) throws SAXNotRecognizedException, SAXNotSupportedException(Code)(Java Doc) protected void setValidationWarnOnDuplicateAttdef(boolean warn) throws SAXNotRecognizedException, SAXNotSupportedException(Code)(Java Doc) protected void setValidationWarnOnUndeclaredElemdef(boolean warn) throws SAXNotRecognizedException, SAXNotSupportedException(Code)(Java Doc)
|
|
|