org.gjt.xpp.impl.pullnode

Class PullNode

public class PullNode extends Node implements XmlPullNode

Allows node tree to be constructed on demand. When PullNode is constructed and method setPullPasrser() is executed (or constructor with PullParser arg is called) node is assumend to be incomplete and children will be retrieved on demand (pulled) including automatic creation of sub pull nodes. If no pull parser is associated (it is null) this class must work like regular XmlNode...

Author: Aleksander Slominski

Field Summary
protected intdepth
protected XmlPullParserpp
Constructor Summary
PullNode(XmlPullParser pp)
Method Summary
voidappendChild(Object child)
Enumerationchildren()
ObjectgetChildAt(int pos)
intgetChildrenCount()
it will reconsruct whole subtree to get count ...
intgetChildrenCountSoFar()
if unfinished it returns actual number of children...
XmlPullParsergetPullParser()
voidinsertChildAt(int pos, Object child)
booleanisFinished()
XmlNodenewNode()
XmlPullNodenewPullNode(XmlPullParser pp)
protected voidprintFields(StringBuffer buf)
Print this class state into StringBuffer element name
voidreadChildren()
Read all reminaing children up to end tag.
ObjectreadNextChild()
voidremoveChildAt(int pos)
voidremoveChildren()
voidreplaceChildAt(int pos, Object child)
voidresetPullNode()
PullNode stays in finished state.
voidsetPullParser(XmlPullParser pp)
Reset pull node to use pull parser.
voidskipChildren()
StringtoString()
Return string representation of start tag including name and list of attributes.

Field Detail

depth

protected int depth

pp

protected XmlPullParser pp

Constructor Detail

PullNode

public PullNode(XmlPullParser pp)

Method Detail

appendChild

public void appendChild(Object child)

children

public Enumeration children()

getChildAt

public Object getChildAt(int pos)

getChildrenCount

public int getChildrenCount()
it will reconsruct whole subtree to get count ...

getChildrenCountSoFar

public int getChildrenCountSoFar()
if unfinished it returns actual number of children...

getPullParser

public XmlPullParser getPullParser()

insertChildAt

public void insertChildAt(int pos, Object child)

isFinished

public boolean isFinished()

newNode

public XmlNode newNode()

newPullNode

public XmlPullNode newPullNode(XmlPullParser pp)

printFields

protected void printFields(StringBuffer buf)
Print this class state into StringBuffer element name

readChildren

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

readNextChild

public Object readNextChild()

removeChildAt

public void removeChildAt(int pos)

removeChildren

public void removeChildren()

replaceChildAt

public void replaceChildAt(int pos, Object child)

resetPullNode

public void resetPullNode()
PullNode stays in finished state.

setPullParser

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

skipChildren

public void skipChildren()

toString

public String toString()
Return string representation of start tag including name and list of attributes.
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