|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gswing.utils.xml.XNode
public class XNode
This is the data structure for xml data tree Fields : String tagName - The name of the current tag (node) String text - The text contained in the node (node value) Properties attributes - the attributes of the tag as Properties You can get the attribute names and values by accessing the properties keys and values. ArrayList childNodes - This is another XNode. This structure makes up a tree of XNodes Traverse recursively.
Constructor Summary | |
---|---|
XNode()
|
Method Summary | |
---|---|
void |
addChildNode(Object node)
Add a child to this node. |
Object |
getChildNode(int index)
Get the child node at this position. |
int |
getNoChildNodes()
Get the number of child nodes belonging to this node. |
String |
getPropertyValue(String name)
Get the current value of a property. |
String |
getTagName()
Get the nodes tag name. |
String |
getText()
Get node text. |
void |
setPropertyValue(String key,
String value)
Set the valuie of a property. |
void |
setTagName(String tagName)
Set the tage name. |
void |
setText(String text)
Set node text. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XNode()
Method Detail |
---|
public int getNoChildNodes()
public Object getChildNode(int index)
index
- the child list index.public void addChildNode(Object node)
node
- The node to add.public String getTagName()
public void setTagName(String tagName)
tagName
- The node's tag name.public String getPropertyValue(String name)
name
- The property key.
public void setPropertyValue(String key, String value)
key
- The property key.value
- The new value.public String getText()
public void setText(String text)
text
- The node text.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |