Modifier and Type | Field and Description |
---|---|
static int |
CDSECT |
protected Vector |
children |
static int |
COMMENT |
static int |
DOCDECL |
static int |
DOCUMENT |
static int |
ELEMENT |
static int |
ENTITY_REF |
static int |
IGNORABLE_WHITESPACE |
static int |
PROCESSING_INSTRUCTION |
static int |
TEXT |
protected StringBuffer |
types |
Constructor and Description |
---|
Node() |
Modifier and Type | Method and Description |
---|---|
void |
addChild(int index,
int type,
Object child)
inserts the given child object of the given type at the
given index.
|
void |
addChild(int type,
Object child)
convenience method for addChild (getChildCount (), child)
|
Element |
createElement(String namespace,
String name)
Builds a default element with the given properties.
|
Object |
getChild(int index)
Returns the child object at the given index.
|
int |
getChildCount()
Returns the number of child objects
|
Element |
getElement(int index)
returns the element at the given index.
|
Element |
getElement(String namespace,
String name)
Returns the element with the given namespace and name.
|
String |
getText(int index)
Returns the text node with the given index or null if the node
with the given index is not a text node.
|
int |
getType(int index)
Returns the type of the child at the given index.
|
int |
indexOf(String namespace,
String name,
int startIndex)
Performs search for an element with the given namespace and
name, starting at the given start index.
|
boolean |
isText(int i) |
void |
parse(XmlPullParser parser)
Recursively builds the child elements from the given parser
until an end tag or end document is found.
|
void |
removeChild(int idx)
Removes the child object at the given index
|
void |
write(XmlSerializer writer)
Writes this node to the given XmlWriter.
|
void |
writeChildren(XmlSerializer writer)
Writes the children of this node to the given XmlWriter.
|
public static final int CDSECT
protected Vector children
public static final int COMMENT
public static final int DOCDECL
public static final int DOCUMENT
public static final int ELEMENT
public static final int ENTITY_REF
public static final int IGNORABLE_WHITESPACE
public static final int PROCESSING_INSTRUCTION
public static final int TEXT
protected StringBuffer types
public void addChild(int index, int type, Object child)
public void addChild(int type, Object child)
public Element createElement(String namespace, String name)
public Object getChild(int index)
public int getChildCount()
public Element getElement(int index)
public Element getElement(String namespace, String name)
public String getText(int index)
public int getType(int index)
public int indexOf(String namespace, String name, int startIndex)
public boolean isText(int i)
public void parse(XmlPullParser parser) throws IOException, XmlPullParserException
IOException
XmlPullParserException
public void removeChild(int idx)
public void write(XmlSerializer writer) throws IOException
IOException
public void writeChildren(XmlSerializer writer) throws IOException
IOException