Class XMLDocuNode

java.lang.Object
com.uc4.api.objects.XMLDocuNode
All Implemented Interfaces:
Iterable<XMLDocuNode>

public class XMLDocuNode extends Object implements Iterable<XMLDocuNode>
This class represents one node in the structured documentation.
  • Constructor Details

    • XMLDocuNode

      public XMLDocuNode(String name)
      Creates a new XMLDocuNode with the specified name.
      Parameters:
      name - Name of the node in the tree
  • Method Details

    • getAttribute

      public String getAttribute(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 Map<String,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(String name, String value)
      Sets the value of an attribute.
      Parameters:
      name - Name
      value - Value
    • removeAttribute

      @Deprecated public void removeAttribute(String name, String value)
      Deprecated.
      call the method without value because it is ignored
      Removes Attribute from node.
      Parameters:
      name - Attribute Name
      value - Attribute Value
    • removeAttribute

      public void removeAttribute(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(String value)
      Sets the value of this node.
      Parameters:
      value - Node value
    • getNodeName

      public String getNodeName()
      Returns the name of this node.
      Returns:
      Node Name
    • getValue

      public 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 Iterator<XMLDocuNode> iterator()
      Iterator which returns all child nodes.
      Specified by:
      iterator in interface Iterable<XMLDocuNode>
      Returns:
      Child nodes