org.gjt.xpp

Interface XmlPullNode

public interface XmlPullNode extends XmlNode

This class represents pullable XML subtree - children are built on demand.

Author: Aleksander Slominski

See Also: XmlNode

Method Summary
Enumerationchildren()
This is not recommened method to pull children when node is not finished (use readNextChild() instead) as Enumeration interface does not allow to throw XmlPullParserException so any parsing exeption is wrapped into RuntimeException making code more messy...
intgetChildrenCountSoFar()
XmlPullParsergetPullParser()
Get parser that is use to build this node tree and this pull node becomes finished - the caller is responsibile to move pull parser state to the end tag of this node (or parent pull node will be left in unconsistent state!
booleanisFinished()
Is pull parsing of node finished.
XmlNodenewNode()
XmlPullNodenewPullNode(XmlPullParser pp)
voidreadChildren()
Read all reminaing children up to end tag.
ObjectreadNextChild()
This is preferred method to pull children (children() requires .wrapping object Enumeration).
voidresetPullNode()
voidsetPullParser(XmlPullParser pp)
Reset pull node to use pull parser.
voidskipChildren()

Method Detail

children

public Enumeration children()
This is not recommened method to pull children when node is not finished (use readNextChild() instead) as Enumeration interface does not allow to throw XmlPullParserException so any parsing exeption is wrapped into RuntimeException making code more messy...

See Also: readNextChild

getChildrenCountSoFar

public int getChildrenCountSoFar()

getPullParser

public XmlPullParser getPullParser()
Get parser that is use to build this node tree and this pull node becomes finished - the caller is responsibile to move pull parser state to the end tag of this node (or parent pull node will be left in unconsistent state!!!!). The returned pull parser position will be before start tag of next child or before final end tag and the caller should use next() to move parser to start reading children. The node state becomes finished and subsequent call to this method will throw exception until setPullParser() is called. The final effect should be equivalen to calling skipNode()!

NOTE: this pull node must be in unfinished state or exception will be thrown

isFinished

public boolean isFinished()
Is pull parsing of node finished.

newNode

public XmlNode newNode()

newPullNode

public XmlPullNode newPullNode(XmlPullParser pp)

readChildren

public void readChildren()
Read all reminaing children up to end tag.

readNextChild

public Object readNextChild()
This is preferred method to pull children (children() requires .wrapping object Enumeration).

Returns: next child (which is String or XmlPullNode) or null if there is no re children

See Also: children

resetPullNode

public void resetPullNode()

setPullParser

public void setPullParser(XmlPullParser pp)
Reset pull node to use pull parser. Pull Parser must be on START_TAG

skipChildren

public void skipChildren()
Copyright (c) 2003 IU Extreme! Lab http://www.extreme.indiana.edu/ All Rights Reserved.

Note this package is deprecated by XPP3 that implements XmlPull API