public class Node
extends Object
-
-
Method Summary
Modifier and Type |
Method |
Description |
void |
addAttribute(String name,
String value) |
|
void |
addAttribute(Attribute attr) |
|
void |
addNode(Node node) |
|
void |
addValue(String value) |
|
boolean |
equals(Object o) |
|
Attribute |
getAttribute(int index) |
|
Attribute |
getAttribute(String name) |
|
int |
getAttributeIntegerValue(String name) |
|
String |
getAttributeValue(String name) |
|
String |
getIndentLevelString(int nIndentLevel) |
|
String |
getIndentLevelString(int nIndentLevel,
String space) |
|
int |
getIndex(String name) |
|
String |
getName() |
|
int |
getNAttributes() |
|
int |
getNNodes() |
|
Node |
getNode(int index) |
|
Node |
getNode(String name) |
|
Node |
getNodeEndsWith(String name) |
|
String |
getNodeValue(String name) |
|
Node |
getParentNode() |
|
Node |
getRootNode() |
|
Object |
getUserData() |
|
String |
getValue() |
|
boolean |
hasAttributes() |
|
boolean |
hasNode(String name) |
|
boolean |
hasNodes() |
|
void |
insertAttributeAt(Attribute attr,
int index) |
|
void |
insertNode(Node node,
int index) |
|
boolean |
isName(String value) |
|
void |
output(PrintWriter ps,
int indentLevel,
boolean hasChildNode) |
|
void |
outputAttributes(PrintWriter ps) |
|
void |
print() |
|
void |
print(boolean hasChildNode) |
|
void |
removeAllAttributes() |
|
void |
removeAllNodes() |
|
boolean |
removeAttribute(String name) |
|
boolean |
removeAttribute(Attribute attr) |
|
boolean |
removeNode(String name) |
|
boolean |
removeNode(Node node) |
|
boolean |
set(Node otherNode) |
|
void |
setAttribute(String name,
int value) |
|
void |
setAttribute(String name,
String value) |
|
void |
setName(String name) |
|
void |
setName(String ns,
String name) |
|
void |
setNameSpace(String ns,
String value) |
|
void |
setNode(String name) |
|
void |
setNode(String name,
String value) |
|
void |
setParentNode(Node node) |
|
void |
setUserData(Object data) |
|
void |
setValue(int value) |
|
void |
setValue(String value) |
|
String |
toString() |
|
String |
toString(String enc,
boolean hasChildNode) |
|
String |
toXMLString() |
|
String |
toXMLString(boolean hasChildNode) |
|
-
Constructor Details
-
public Node()
Create a Node with empty UserData and no Parent Node
-
-
-
public Node(
Node otherNode)
-
Method Details
-
public void setParentNode(
Node node)
-
public Node getParentNode()
-
public Node getRootNode()
-
public void setName(
String name)
-
-
-
public boolean isName(
String value)
-
public void setValue(
String value)
-
public void setValue(int value)
-
public void addValue(
String value)
-
-
public int getNAttributes()
-
-
-
-
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 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 String getIndentLevelString(
int nIndentLevel,
String space)
- Parameters:
nIndentLevel
- the level of indentation to produce
space
- the String to use for the intendation
- Returns:
- an indentation String
- Since:
- 1.8.0
-
-
public void output(
PrintWriter ps,
int indentLevel,
boolean hasChildNode)
-
-
-
public String toXMLString(
boolean hasChildNode)
-
-
public void print(boolean hasChildNode)
-