|
XML for Java 2.0.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.xml.framework.XMLParser | +--com.ibm.xml.parsers.NonValidatingDOMParser
Field Summary | |
static java.lang.String |
DEFAULT_DOCUMENT_CLASS
Default programmatic document class. |
static int |
DEFERRED
Represents deferred DOM Node expansion of Node objects and data. |
protected AttrPool |
fAttrPool
|
protected Node |
fCurrentNode
|
protected int |
fCurrentNodeIndex
|
protected DeferredDocumentImpl |
fDeferredDocumentImpl
|
protected Document |
fDocument
|
protected java.lang.String |
fDocumentClass
|
protected DocumentImpl |
fDocumentImpl
|
protected int |
fDocumentIndex
|
protected DocumentType |
fDocumentType
|
protected int |
fDocumentTypeIndex
|
protected ElementDeclPool |
fElementDeclPool
|
protected EntityPool |
fEntityPool
|
protected boolean |
fExpandEntityReferences
|
protected int |
fNodeExpansion
|
protected java.util.Stack |
fNodeStack
|
protected boolean |
fRootElement
|
protected StringPool |
fStringPool
|
static int |
FULL
Represents full DOM Node expansion of Node objects and data. |
protected boolean |
fWithinElement
|
Fields inherited from class com.ibm.xml.framework.XMLParser |
fLocale,
fNeedReset,
fParseInProgress,
fResourceBundle,
fScanner |
Constructor Summary | |
NonValidatingDOMParser()
Default constructor. |
Method Summary | |
void |
attlistDecl(int elementIndex,
int attDefIndex)
<!ATTLIST Name AttDef> |
void |
characters(char[] ch,
int start,
int length,
boolean cdataSection)
Not called. |
void |
characters(int dataIndex,
boolean cdataSection)
Characters. |
protected void |
checkHandlers()
|
void |
comment(int dataIndex)
Comment. |
void |
doctypeDecl(int rootElementNameIndex)
This function will be called when a <!DOCTYPE...> declaration is encountered. |
void |
elementDecl(int elementIndex)
<!ELEMENT Name contentspec> |
void |
endDocument()
End document. |
void |
endElement(int elementNameIndex)
End element. |
void |
endEntityReference(int entityIndex)
End entity reference. |
void |
endExternalSubset()
This function will be called at the end of the "external subset" of a doctype declaration. |
void |
endInternalSubset()
This function will be called at the end of the "internal subset" of a doctype declaration. |
void |
externalEntityDecl(int entityIndex)
<!ENTITY Name ExternalID> (external) |
Node |
getCurrentNode()
Return the current DOM Node. |
Document |
getDocument()
Returns the document. |
boolean |
getExpandEntityReferences()
Return a boolean which says whether EntityReference Nodes are expanded (replaced) by this parser. |
int |
getNodeExpansion()
Return the Node expansion level integer mapping to the constants in DOMParser. |
void |
ignorableWhitespace(char[] ch,
int start,
int length,
boolean cdataSection)
Not called. |
void |
ignorableWhitespace(int dataIndex,
boolean cdataSection)
Ignorable whitespace. |
protected void |
init(ParserState state)
|
void |
internalEntityDecl(int entityIndex)
<!ENTITY Name EntityValue> (internal) |
void |
notationDecl(int notationIndex)
<!NOTATION Name ExternalId> |
void |
parameterEntityDecl(int entityIndex)
|
void |
parse(InputSource source)
Parses the specified input source. |
void |
processingInstruction(int targetIndex,
int dataIndex)
Processing instruction. |
void |
reset()
|
protected void |
resetOrCopy()
|
void |
setDocumentClass(java.lang.String documentClass)
This allows the programmer to decide which document factory to use when constructing the DOM tree. |
void |
setExpandEntityReferences(boolean expand)
Sets whether EntityReference Nodes are expanded (replaced) by this parser. |
void |
setNodeExpansion(int nodeExpansion)
Sets whether Nodes are created and the data is kept within the Nodes. |
void |
startDocument(int versionIndex,
int encodingIndex,
int standAloneIndex)
Start document. |
void |
startElement(int elementNameIndex,
int attrListIndex)
Start element. |
void |
startEntityReference(int entityIndex)
Start entity reference. |
void |
startExternalSubset(int publicIdStringIndex,
int systemIdStringIndex)
This function will be called at the start of the "external subset" of a doctype declaration. |
void |
startInternalSubset()
This function will be called at the start of the "internal subset" of a doctype declaration. |
void |
unparsedEntityDecl(int entityIndex)
<!ENTITY Name ExternalID NDataDecl> (unparsed) |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final int FULL
public static final int DEFERRED
public static final java.lang.String DEFAULT_DOCUMENT_CLASS
protected int fDocumentIndex
protected int fDocumentTypeIndex
protected int fCurrentNodeIndex
protected DocumentType fDocumentType
protected Node fCurrentNode
protected java.util.Stack fNodeStack
protected Document fDocument
protected DocumentImpl fDocumentImpl
protected DeferredDocumentImpl fDeferredDocumentImpl
protected boolean fExpandEntityReferences
protected int fNodeExpansion
protected boolean fWithinElement
protected AttrPool fAttrPool
protected ElementDeclPool fElementDeclPool
protected EntityPool fEntityPool
protected StringPool fStringPool
protected java.lang.String fDocumentClass
protected boolean fRootElement
Constructor Detail |
public NonValidatingDOMParser()
Method Detail |
public void reset()
protected void resetOrCopy()
protected void init(ParserState state)
protected void checkHandlers() throws java.lang.Exception
public void setExpandEntityReferences(boolean expand)
The default value is false, EntityReference Nodes are kept.
keep
- =true
means expanding entity references;
=false
means maintain entity references.EntityReference
,
GeneralReference
public boolean getExpandEntityReferences()
The default value is false, EntityReference Nodes are kept.
keep
- =true
means expanding entity references;
=false
means maintain entity references.EntityReference
,
GeneralReference
public void setNodeExpansion(int nodeExpansion)
nodeExpansion
- public int getNodeExpansion()
nodeExpansion
- public Node getCurrentNode()
This function will only return meaningful Node values when setNodeExpansion(FULL). When setNodeExpansion(DEFERRED) is set, Node creation is deferred and getCurrentNode() will likely return null.
This function is useful for querying the parser when getting an error or warning callback.
setNodeExpansion(int)
public void doctypeDecl(int rootElementNameIndex) throws java.lang.Exception
public void startInternalSubset() throws java.lang.Exception
public void endInternalSubset() throws java.lang.Exception
public void startExternalSubset(int publicIdStringIndex, int systemIdStringIndex) throws java.lang.Exception
public void endExternalSubset() throws java.lang.Exception
public void elementDecl(int elementIndex) throws java.lang.Exception
public void attlistDecl(int elementIndex, int attDefIndex) throws java.lang.Exception
public void internalEntityDecl(int entityIndex) throws java.lang.Exception
public void externalEntityDecl(int entityIndex) throws java.lang.Exception
public void unparsedEntityDecl(int entityIndex) throws java.lang.Exception
public void notationDecl(int notationIndex) throws java.lang.Exception
public void parameterEntityDecl(int entityIndex)
public void setDocumentClass(java.lang.String documentClass)
Note: Setting the document class name to any other document class besides the default class will switch the node expansion to FULL.
documentClass
- The fully qualified class name of the
document factory to use when constructing
the DOM tree.#DEFERRED_DOCUMENT_CLASS
,
setNodeExpansion(int)
,
FULL
public Document getDocument()
public void startDocument(int versionIndex, int encodingIndex, int standAloneIndex)
public void endDocument() throws java.lang.Exception
public void startElement(int elementNameIndex, int attrListIndex) throws java.lang.Exception
public void endElement(int elementNameIndex) throws java.lang.Exception
public void startEntityReference(int entityIndex) throws java.lang.Exception
public void endEntityReference(int entityIndex) throws java.lang.Exception
public void characters(int dataIndex, boolean cdataSection) throws java.lang.Exception
public void ignorableWhitespace(int dataIndex, boolean cdataSection) 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, boolean cdataSection) throws java.lang.Exception
public void ignorableWhitespace(char[] ch, int start, int length, boolean cdataSection) throws java.lang.Exception
public void parse(InputSource source) throws SAXException, java.io.IOException
source
- The input source.
|
XML for Java 2.0.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |