Class SimpleElement

java.lang.Object
com.articulate.sigma.SimpleElement

public class SimpleElement extends Object
SimpleElement is the only node type for simplified DOM model. Note that all CDATA values are stored with reserved characters > and < converted to entity types respectively.
  • Constructor Details

    • SimpleElement

      public SimpleElement(String tagName)
  • Method Details

    • getTagName

      public String getTagName()
    • setTagName

      public void setTagName(String tagName)
    • getText

      public String getText()
    • setText

      public void setText(String text)
    • getAttribute

      public String getAttribute(String name)
    • getAttributeNames

      public Set<String> getAttributeNames()
    • setAttribute

      public void setAttribute(String name, String value)
    • addChildElement

      public void addChildElement(SimpleElement element)
    • getChildElements

      public List<SimpleElement> getChildElements()
    • getChildByFirstTag

      public SimpleElement getChildByFirstTag(String tag)
      Retrieves the first child element by name
      Parameters:
      tag - an element name to search for
      Returns:
      the first child with the given tag name, null if none
    • toString

      public String toString(int indent, boolean forFile)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toFileString

      public String toFileString()
    • toFileString

      public String toFileString(int indent)