Package com.uc4.api.objects
Class XMLDocuNode
- java.lang.Object
-
- com.uc4.api.objects.XMLDocuNode
-
- All Implemented Interfaces:
java.lang.Iterable<XMLDocuNode>
public class XMLDocuNode extends java.lang.Object implements java.lang.Iterable<XMLDocuNode>
This class represents one node in the structured documentation.
-
-
Constructor Summary
Constructors Constructor Description XMLDocuNode(java.lang.String name)
Creates a newXMLDocuNode
with the specified name.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addChildNode(XMLDocuNode node)
Adds a new child node.java.lang.String
getAttribute(java.lang.String attributeName)
java.util.Map<java.lang.String,java.lang.String>
getAttributes()
Returns a Map of all attribute names and values which are defined for this element.int
getChildCount()
Returns the number of Child elements.java.lang.String
getNodeName()
Returns the name of this node.java.lang.String
getValue()
Returns the value of this node or an empty String if not set.boolean
hasChildNodes()
java.util.Iterator<XMLDocuNode>
iterator()
Iterator which returns all child nodes.void
removeAttribute(java.lang.String name)
Removes Attribute from node.void
removeAttribute(java.lang.String name, java.lang.String value)
Deprecated.call the method without value because it is ignoredvoid
removeChildNodes()
Removes all child nodes.void
setAttribute(java.lang.String name, java.lang.String value)
Sets the value of an attribute.void
setValue(java.lang.String value)
Sets the value of this node.
-
-
-
Method Detail
-
getAttribute
public java.lang.String getAttribute(java.lang.String attributeName)
- 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
public java.util.Map<java.lang.String,java.lang.String> getAttributes()
Returns a Map of all attribute names and values which are defined for this element.- Returns:
- Map of attributes
-
setAttribute
public void setAttribute(java.lang.String name, java.lang.String value)
Sets the value of an attribute.- Parameters:
name
- Namevalue
- Value
-
removeAttribute
@Deprecated public void removeAttribute(java.lang.String name, java.lang.String value)
Deprecated.call the method without value because it is ignoredRemoves Attribute from node.- Parameters:
name
- Attribute Namevalue
- Attribute Value
-
removeAttribute
public void removeAttribute(java.lang.String name)
Removes Attribute from node.- Parameters:
name
- Attribute Name
-
getChildCount
public int getChildCount()
Returns the number of Child elements.- Returns:
- Count
-
setValue
public void setValue(java.lang.String value)
Sets the value of this node.- Parameters:
value
- Node value
-
getNodeName
public java.lang.String getNodeName()
Returns the name of this node.- Returns:
- Node Name
-
getValue
public java.lang.String getValue()
Returns the value of this node or an empty String if not set.- Returns:
- Value
-
addChildNode
public void addChildNode(XMLDocuNode node)
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
public java.util.Iterator<XMLDocuNode> iterator()
Iterator which returns all child nodes.- Specified by:
iterator
in interfacejava.lang.Iterable<XMLDocuNode>
- Returns:
- Child nodes
-
-