|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectxmlstreamparser.Node
public class Node
Basic functions: - hasAttribute= attributes.containsKey("attribute name"); - Get attribute value= attributes.get("attribute name"); - Add attribute= attributes.put("attribute name", "attribute value"); - Get child= children.get(i); - Add child= children.add(child); Note that string values must not be null: empty strings are used instead.
Field Summary | |
---|---|
java.util.Hashtable |
attributes
Node attributes. key = attribute name, value = attribute value. |
java.util.Vector |
children
Children nodes, in order of appearance in the xml document. |
java.lang.String |
name
Node name ex: |
Node |
parent
Parent node. |
java.lang.String |
text
Node text. |
Constructor Summary | |
---|---|
Node(HttpNode _node)
Constructor/Converter |
|
Node(Node _parent)
Constructor. |
Method Summary | |
---|---|
Node |
getChild(java.lang.String _nodeName)
Returns a child node given its name (node name). |
Node |
getChild(java.lang.String _nodeName,
java.lang.String _attrName,
java.lang.String _attrVal)
Returns a child node given its name (node name) and given attribute value. |
java.util.Vector |
getChildren()
|
java.lang.String |
getValue(java.lang.String _attributeName)
Returns the value of an attribute given its name. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public Node parent
public java.lang.String name
public java.util.Hashtable attributes
public java.lang.String text
public java.util.Vector children
Constructor Detail |
---|
public Node(Node _parent)
_parent
- Parent node. Is null if the node has no parent (main node).public Node(HttpNode _node)
_node
- Method Detail |
---|
public java.lang.String getValue(java.lang.String _attributeName)
public Node getChild(java.lang.String _nodeName)
public Node getChild(java.lang.String _nodeName, java.lang.String _attrName, java.lang.String _attrVal)
String
- String String
public java.util.Vector getChildren()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |