public class Node extends Object
Constructor and Description |
---|
Node()
Create a Node with empty UserData and no Parent Node
|
Node(Node otherNode) |
Node(String name) |
Node(String ns,
String name) |
public Node()
public Node(String name)
public Node(Node otherNode)
public void setParentNode(Node node)
public Node getParentNode()
public Node getRootNode()
public void setName(String name)
public String getName()
public boolean isName(String value)
public void setValue(String value)
public void setValue(int value)
public void addValue(String value)
public String getValue()
public int getNAttributes()
public Attribute getAttribute(int index)
public void addAttribute(Attribute attr)
public void insertAttributeAt(Attribute attr, int index)
public boolean removeAttribute(Attribute attr)
public boolean removeAttribute(String name)
public void removeAllAttributes()
public boolean hasAttributes()
public void setAttribute(String name, int value)
public int getAttributeIntegerValue(String name)
public boolean set(Node otherNode)
public int getNNodes()
public Node getNode(int index)
public void addNode(Node node)
public void insertNode(Node node, int index)
public int getIndex(String name)
public boolean removeNode(Node node)
public boolean removeNode(String name)
public void removeAllNodes()
public boolean hasNodes()
public boolean hasNode(String name)
public void setNode(String name)
public void setUserData(Object data)
public Object getUserData()
public String getIndentLevelString(int nIndentLevel)
getIndentLevelString(int, String)
with " "
as StringgetIndentLevelString(int, String)
public String getIndentLevelString(int nIndentLevel, String space)
nIndentLevel
- the level of indentation to producespace
- the String to use for the intendationpublic void outputAttributes(PrintWriter ps)
public void output(PrintWriter ps, int indentLevel, boolean hasChildNode)
public String toXMLString(boolean hasChildNode)
public String toXMLString()
public void print(boolean hasChildNode)
public void print()