Package org.cybergarage.xml
Class Node
java.lang.Object
org.cybergarage.xml.Node
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAttribute
(String name, String value) void
addAttribute
(Attribute attr) void
void
boolean
getAttribute
(int index) getAttribute
(String name) int
getAttributeValue
(String name) getIndentLevelString
(int nIndentLevel) InovokegetIndentLevelString(int, String)
with" "
as StringgetIndentLevelString
(int nIndentLevel, String space) int
getName()
int
int
getNode
(int index) getNodeEndsWith
(String name) getNodeValue
(String name) getValue()
boolean
boolean
boolean
hasNodes()
void
insertAttributeAt
(Attribute attr, int index) void
insertNode
(Node node, int index) boolean
void
output
(PrintWriter ps, int indentLevel, boolean hasChildNode) void
void
print()
void
print
(boolean hasChildNode) void
void
boolean
removeAttribute
(String name) boolean
removeAttribute
(Attribute attr) boolean
removeNode
(String name) boolean
removeNode
(Node node) boolean
void
setAttribute
(String name, int value) void
setAttribute
(String name, String value) void
void
void
setNameSpace
(String ns, String value) void
void
void
setParentNode
(Node node) void
setUserData
(Object data) void
setValue
(int value) void
toString()
toXMLString
(boolean hasChildNode)
-
Constructor Details
-
Node
public Node()Create a Node with empty UserData and no Parent Node -
Node
-
Node
-
Node
-
-
Method Details
-
setParentNode
-
getParentNode
-
getRootNode
-
setName
-
setName
-
getName
-
isName
-
setValue
-
setValue
public void setValue(int value) -
addValue
-
getValue
-
getNAttributes
public int getNAttributes() -
getAttribute
-
getAttribute
-
addAttribute
-
insertAttributeAt
-
addAttribute
-
removeAttribute
-
removeAttribute
-
removeAllAttributes
public void removeAllAttributes() -
hasAttributes
public boolean hasAttributes() -
setAttribute
-
setAttribute
-
getAttributeValue
-
getAttributeIntegerValue
-
setNameSpace
-
set
-
equals
-
getNNodes
public int getNNodes() -
getNode
-
getNode
-
getNodeEndsWith
-
addNode
-
insertNode
-
getIndex
-
removeNode
-
removeNode
-
removeAllNodes
public void removeAllNodes() -
hasNodes
public boolean hasNodes() -
hasNode
-
setNode
-
setNode
-
getNodeValue
-
setUserData
-
getUserData
-
getIndentLevelString
InovokegetIndentLevelString(int, String)
with" "
as String- See Also:
-
getIndentLevelString
- Parameters:
nIndentLevel
- the level of indentation to producespace
- the String to use for the intendation- Returns:
- an indentation String
- Since:
- 1.8.0
-
outputAttributes
-
output
-
toString
-
toString
-
toXMLString
-
toXMLString
-
print
public void print(boolean hasChildNode) -
print
public void print()
-