|
XML for Java EA2 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.xml.framework.XMLDocumentScanner | +--com.ibm.xml.framework.XMLParser | +--com.ibm.xml.parsers.DOMParser
Field Summary | |
static java.lang.String |
DEFAULT_DOCUMENT_CLASS_NAME
Default programmatic document class name (com.ibm.xml.dom.DocumentImpl). |
protected int |
fAmpIndex
|
protected int |
fAposIndex
|
protected Node |
fCurrentElementNode
|
protected int |
fCurrentNodeIndex
|
protected DeferredDocumentImpl |
fDeferredDocumentImpl
|
protected Document |
fDocument
|
protected DocumentImpl |
fDocumentImpl
|
protected int |
fDocumentIndex
|
protected DocumentType |
fDocumentType
|
protected int |
fDocumentTypeIndex
|
protected int |
fGtIndex
|
protected boolean |
fInCDATA
|
protected int |
fLtIndex
|
protected int |
fQuotIndex
|
protected boolean |
fWithinElement
|
Fields inherited from class com.ibm.xml.framework.XMLParser |
fNamespacesEnabled,
fNamespaceSep,
fParseInProgress,
fValidator,
SAX2_FEATURES_PREFIX,
SAX2_HANDLERS_PREFIX,
SAX2_PROPERTIES_PREFIX,
XML4J_FEATURES_PREFIX,
XML4J_PROPERTIES_PREFIX |
Constructor Summary | |
DOMParser()
Default constructor. |
Method Summary | |
void |
attlistDecl(int elementTypeIndex,
int attrNameIndex,
int attType,
java.lang.String enumString,
int attDefaultType,
int attDefaultValue)
<!ATTLIST Name AttDef> |
void |
characters(char[] ch,
int start,
int length)
Not called. |
void |
characters(int dataIndex)
Characters. |
void |
comment(int dataIndex)
Comment. |
void |
elementDecl(int elementTypeIndex,
java.lang.String contentModel)
<!ELEMENT Name contentspec> |
void |
endCDATA()
End CDATA section. |
void |
endDocument()
End document. |
void |
endDTD()
This function will be called at the end of the DTD. |
void |
endElement(int elementTypeIndex)
End element. |
void |
endEntityReference(int entityName,
int entityType,
int entityContext)
End entity reference. |
void |
endNamespaceDeclScope(int prefix)
Report the end of the scope of a namespace declaration. |
void |
externalEntityDecl(int entityName,
int publicId,
int systemId)
<!ENTITY Name ExternalID> (external) |
void |
externalPEDecl(int entityName,
int publicId,
int systemId)
<!ENTITY % Name ExternalID> (external) |
boolean |
getCreateEntityReferenceNodes()
|
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. |
Document |
getDocument()
Returns the document. |
protected java.lang.String |
getDocumentClassName()
Returns the fully qualified class name of the document factory used when constructing the DOM tree. |
boolean |
getFeature(java.lang.String featureId)
Query the current state of any feature in a SAX2 parser. |
java.lang.String[] |
getFeaturesRecognized()
Returns a list of features that this parser recognizes. |
java.lang.String[] |
getPropertiesRecognized()
Returns a list of properties that this parser recognizes. |
java.lang.Object |
getProperty(java.lang.String propertyId)
Return the current value of a property in a SAX2 parser. |
void |
ignorableWhitespace(char[] ch,
int start,
int length)
Not called. |
void |
ignorableWhitespace(int dataIndex)
Ignorable whitespace. |
protected void |
init()
Initializes the parser to a pre-parse state. |
void |
internalEntityDecl(int entityName,
int entityValue)
<!ENTITY Name EntityValue> (internal) |
void |
internalPEDecl(int entityName,
int entityValue)
<!ENTITY % Name EntityValue> (internal) |
void |
notationDecl(int notationName,
int publicId,
int systemId)
<!NOTATION Name ExternalId> |
void |
processingInstruction(int targetIndex,
int dataIndex)
Processing instruction. |
void |
reset()
Resets the parser. |
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. |
protected void |
setDeferNodeExpansion(boolean deferNodeExpansion)
This method sets whether the expansion of the nodes in the default DOM implementation are deferred. |
protected void |
setDocumentClassName(java.lang.String documentClassName)
This method allows the programmer to decide which document factory to use when constructing the DOM tree. |
void |
setFeature(java.lang.String featureId,
boolean state)
Set the state of any feature in a SAX2 parser. |
void |
setProperty(java.lang.String propertyId,
java.lang.Object value)
Set the value of any property in a SAX2 parser. |
void |
startCDATA()
Start CDATA section. |
void |
startDocument(int versionIndex,
int encodingIndex,
int standAloneIndex)
Start document. |
void |
startDTD(int rootElementType,
int publicId,
int systemId)
This function will be called when a <!DOCTYPE...> declaration is encountered. |
void |
startElement(int elementTypeIndex,
XMLAttrList xmlAttrList,
int attrListIndex)
Start element. |
void |
startEntityReference(int entityName,
int entityType,
int entityContext)
Start entity reference. |
void |
startNamespaceDeclScope(int prefix,
int uri)
Report the start of the scope of a namespace declaration. |
void |
unparsedEntityDecl(int entityName,
int publicId,
int systemId,
int notationName)
<!ENTITY Name ExternalID NDataDecl> (unparsed) |
Methods inherited from class com.ibm.xml.framework.XMLDocumentScanner |
abortMarkup,
abortMarkup,
abortMarkup,
abortMarkup,
checkXMLLangAttributeValue,
decreaseMarkupDepth,
endOfInput,
getScannerState,
increaseMarkupDepth,
markupDepth,
parseSome,
readerChange,
reportFatalXMLError,
reportFatalXMLError,
reportFatalXMLError,
reportFatalXMLError,
reportFatalXMLError,
reportFatalXMLError,
scanComplexAttValue,
setEntityHandler,
setErrorReporter,
skipPastEndOfCurrentMarkup |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final java.lang.String DEFAULT_DOCUMENT_CLASS_NAME
protected Document fDocument
protected DeferredDocumentImpl fDeferredDocumentImpl
protected int fDocumentIndex
protected int fDocumentTypeIndex
protected int fCurrentNodeIndex
protected DocumentImpl fDocumentImpl
protected DocumentType fDocumentType
protected Node fCurrentElementNode
protected boolean fWithinElement
protected boolean fInCDATA
protected int fAmpIndex
protected int fLtIndex
protected int fGtIndex
protected int fAposIndex
protected int fQuotIndex
Constructor Detail |
public DOMParser()
Method Detail |
public Document getDocument()
public java.lang.String[] getFeaturesRecognized()
XMLParser.isFeatureRecognized(java.lang.String)
,
setFeature(java.lang.String, boolean)
,
getFeature(java.lang.String)
public java.lang.String[] getPropertiesRecognized()
XMLParser.isPropertyRecognized(java.lang.String)
,
setProperty(java.lang.String, java.lang.Object)
,
getProperty(java.lang.String)
public void reset() throws java.lang.Exception
public void resetOrCopy() throws java.lang.Exception
protected void init()
parse()
.protected void setDeferNodeExpansion(boolean deferNodeExpansion)
getDeferNodeExpansion()
,
setDocumentClassName(java.lang.String)
protected boolean getDeferNodeExpansion()
setDeferNodeExpansion(boolean)
protected void setCreateEntityReferenceNodes(boolean create)
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.
create
- True to create entity reference nodes; false
to only insert the entity reference children.getCreateEntityReferenceNodes()
public boolean getCreateEntityReferenceNodes()
setCreateEntityReferenceNodes(boolean)
protected void setDocumentClassName(java.lang.String documentClassName)
documentClassName
- The fully qualified class name of the
document factory to use when constructing
the DOM tree.getDocumentClassName()
,
setDeferNodeExpansion(boolean)
,
DEFAULT_DOCUMENT_CLASS_NAME
protected java.lang.String getDocumentClassName()
setDocumentClassName(java.lang.String)
protected Element getCurrentElementNode()
Note: This method is not supported when the "deferNodeExpansion" property is set to true and the document factory is set to the default factory.
public void setFeature(java.lang.String featureId, boolean state) throws SAXException
featureId
- The unique identifier (URI) of the feature.state
- The requested state of the feature (true or false).public boolean getFeature(java.lang.String featureId) throws SAXException
featureId
- The unique identifier (URI) of the feature
being set.public void setProperty(java.lang.String propertyId, java.lang.Object value) throws SAXException
propertyId
- The unique identifier (URI) of the property
being set.Object
- The value to which the property is being set.public java.lang.Object getProperty(java.lang.String propertyId) throws SAXException
propertyId
- The unique identifier (URI) of the property
being set.Configurable.getProperty(java.lang.String)
public void startDocument(int versionIndex, int encodingIndex, int standAloneIndex)
public void endDocument() throws java.lang.Exception
public void startNamespaceDeclScope(int prefix, int uri) throws java.lang.Exception
public void endNamespaceDeclScope(int prefix) throws java.lang.Exception
public void startElement(int elementTypeIndex, XMLAttrList xmlAttrList, int attrListIndex) throws java.lang.Exception
public void endElement(int elementTypeIndex) throws java.lang.Exception
public void characters(int dataIndex) throws java.lang.Exception
public void ignorableWhitespace(int dataIndex) throws java.lang.Exception
public void processingInstruction(int targetIndex, int dataIndex) throws java.lang.Exception
public void comment(int dataIndex) throws java.lang.Exception
public void characters(char[] ch, int start, int length) throws java.lang.Exception
public void ignorableWhitespace(char[] ch, int start, int length) throws java.lang.Exception
public void startCDATA() throws java.lang.Exception
public void endCDATA() throws java.lang.Exception
public void startEntityReference(int entityName, int entityType, int entityContext) throws java.lang.Exception
public void endEntityReference(int entityName, int entityType, int entityContext) throws java.lang.Exception
public void startDTD(int rootElementType, int publicId, int systemId) throws java.lang.Exception
public void endDTD() throws java.lang.Exception
public void elementDecl(int elementTypeIndex, java.lang.String contentModel) throws java.lang.Exception
public void attlistDecl(int elementTypeIndex, int attrNameIndex, int attType, java.lang.String enumString, int attDefaultType, int attDefaultValue) throws java.lang.Exception
public void internalPEDecl(int entityName, int entityValue) throws java.lang.Exception
public void externalPEDecl(int entityName, int publicId, int systemId) throws java.lang.Exception
public void internalEntityDecl(int entityName, int entityValue) throws java.lang.Exception
public void externalEntityDecl(int entityName, int publicId, int systemId) throws java.lang.Exception
public void unparsedEntityDecl(int entityName, int publicId, int systemId, int notationName) throws java.lang.Exception
public void notationDecl(int notationName, int publicId, int systemId) throws java.lang.Exception
|
XML for Java EA2 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |