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 TypeMethodDescriptionvoidaddChildNode(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.intReturns 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.booleaniterator()Iterator which returns all child nodes.voidremoveAttribute(String name) Removes Attribute from node.voidremoveAttribute(String name, String value) Deprecated.call the method without value because it is ignoredvoidRemoves all child nodes.voidsetAttribute(String name, String value) Sets the value of an attribute.voidSets the value of this node.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
XMLDocuNode
Creates a newXMLDocuNodewith 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:
iteratorin interfaceIterable<XMLDocuNode>- Returns:
- Child nodes
-