Package com.uc4.api.objects
Class XMLDocuNode
java.lang.Object
com.uc4.api.objects.XMLDocuNode
- All Implemented Interfaces:
Iterable<XMLDocuNode>
This class represents one node in the structured documentation.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addChildNode
(XMLDocuNode node) Adds a new child node.getAttribute
(String attributeName) Returns a Map of all attribute names and values which are defined for this element.int
Returns the number of Child elements.Returns the name of this node.getValue()
Returns the value of this node or an empty String if not set.boolean
iterator()
Iterator which returns all child nodes.void
removeAttribute
(String name) Removes Attribute from node.void
removeAttribute
(String name, String value) Deprecated.call the method without value because it is ignoredvoid
Removes all child nodes.void
setAttribute
(String name, String value) Sets the value of an attribute.void
Sets the value of this node.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
XMLDocuNode
Creates a newXMLDocuNode
with the specified name.- Parameters:
name
- Name of the node in the tree
-
-
Method Details
-
getAttribute
- Parameters:
attributeName
- Name of the attribute- Returns:
- Returns the value of the specified attribtue or an empty String if the attribute was not found
-
getAttributes
Returns a Map of all attribute names and values which are defined for this element.- Returns:
- Map of attributes
-
setAttribute
Sets the value of an attribute.- Parameters:
name
- Namevalue
- Value
-
removeAttribute
Deprecated.call the method without value because it is ignoredRemoves Attribute from node.- Parameters:
name
- Attribute Namevalue
- Attribute Value
-
removeAttribute
Removes Attribute from node.- Parameters:
name
- Attribute Name
-
getChildCount
public int getChildCount()Returns the number of Child elements.- Returns:
- Count
-
setValue
Sets the value of this node.- Parameters:
value
- Node value
-
getNodeName
Returns the name of this node.- Returns:
- Node Name
-
getValue
Returns the value of this node or an empty String if not set.- Returns:
- Value
-
addChildNode
Adds a new child node.- Parameters:
node
- Child Node
-
hasChildNodes
public boolean hasChildNodes()- Returns:
- true if this node has child nodes
-
removeChildNodes
public void removeChildNodes()Removes all child nodes. -
iterator
Iterator which returns all child nodes.- Specified by:
iterator
in interfaceIterable<XMLDocuNode>
- Returns:
- Child nodes
-