|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.kxml2.kdom.Node
public class Node
A common base class for Document and Element, also used for storing XML fragments.
Field Summary | |
---|---|
static int |
CDSECT
|
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
|
Constructor Summary | |
---|---|
Node()
|
Method Summary | |
---|---|
void |
addChild(int index,
int type,
java.lang.Object child)
inserts the given child object of the given type at the given index. |
void |
addChild(int type,
java.lang.Object child)
convenience method for addChild (getChildCount (), child) |
Element |
createElement(java.lang.String namespace,
java.lang.String name)
Builds a default element with the given properties. |
java.lang.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(java.lang.String namespace,
java.lang.String name)
Returns the element with the given namespace and name. |
java.lang.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(java.lang.String namespace,
java.lang.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(org.xmlpull.v1.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(org.xmlpull.v1.XmlSerializer writer)
Writes this node to the given XmlWriter. |
void |
writeChildren(org.xmlpull.v1.XmlSerializer writer)
Writes the children of this node to the given XmlWriter. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DOCUMENT
public static final int ELEMENT
public static final int TEXT
public static final int CDSECT
public static final int ENTITY_REF
public static final int IGNORABLE_WHITESPACE
public static final int PROCESSING_INSTRUCTION
public static final int COMMENT
public static final int DOCDECL
Constructor Detail |
---|
public Node()
Method Detail |
---|
public void addChild(int index, int type, java.lang.Object child)
public void addChild(int type, java.lang.Object child)
public Element createElement(java.lang.String namespace, java.lang.String name)
public java.lang.Object getChild(int index)
public int getChildCount()
public Element getElement(int index)
public Element getElement(java.lang.String namespace, java.lang.String name)
public java.lang.String getText(int index)
public int getType(int index)
public int indexOf(java.lang.String namespace, java.lang.String name, int startIndex)
public boolean isText(int i)
public void parse(org.xmlpull.v1.XmlPullParser parser) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException
java.io.IOException
org.xmlpull.v1.XmlPullParserException
public void removeChild(int idx)
public void write(org.xmlpull.v1.XmlSerializer writer) throws java.io.IOException
java.io.IOException
public void writeChildren(org.xmlpull.v1.XmlSerializer writer) throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |