Class Element

java.lang.Object
org.concordion.api.Element

public final class Element extends Object
  • Field Details

  • Constructor Details

    • Element

      public Element(String name)
    • Element

      public Element(nu.xom.Element xomElement)
      For internal use only.
      Parameters:
      xomElement - the xom element to initialise
  • Method Details

    • getText

      public String getText()
    • addStyleClass

      public Element addStyleClass(String styleClass)
    • appendNonBreakingSpace

      public Element appendNonBreakingSpace()
    • appendText

      public Element appendText(String text)
    • appendNonBreakingSpaceIfBlank

      public Element appendNonBreakingSpaceIfBlank()
    • prependText

      public Element prependText(String text)
    • prependChild

      public Element prependChild(Element element)
    • appendChild

      public void appendChild(Element element)
    • removeChild

      public void removeChild(Element element)
    • moveChildrenTo

      public void moveChildrenTo(Element element)
    • setId

      public Element setId(String id)
    • addAttribute

      public Element addAttribute(String localName, String value)
    • getAttributeValue

      public String getAttributeValue(String name)
    • getAttributeValue

      public String getAttributeValue(String localName, String namespaceURI)
    • removeAttribute

      public void removeAttribute(String name)
    • removeAttribute

      public void removeAttribute(String localName, String namespaceURI)
    • moveAttributesTo

      public void moveAttributesTo(Element element)
    • toXML

      public String toXML()
    • getRootElement

      public Element getRootElement()
    • getFirstChildElement

      public Element getFirstChildElement(String name)
    • hasChildren

      public boolean hasChildren()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • getLocalName

      public String getLocalName()
    • isNamed

      public boolean isNamed(String name)
    • getDescendantElements

      public Element[] getDescendantElements(String name)
    • getChildElements

      public Element[] getChildElements(String name)
    • getChildElements

      public Element[] getChildElements()
    • getFirstDescendantNamed

      public Element getFirstDescendantNamed(String name)
    • appendSister

      public void appendSister(Element element)
    • getElementById

      public Element getElementById(String id)
      Returns the first child Element with the specified "id" attribute, or null, if no matching element is found.
      Parameters:
      id - the id of the element to get
      Returns:
      the element - or null if not found
    • getParentElement

      public Element getParentElement()
      Returns the element that contains this element, or null if this element is the root element or is orphaned.
      Returns:
      Element
    • deepClone

      public Element deepClone()