Class Element


public class Element extends Object
Represents one XML element.
Tom Baeyens, Joram Barrez
  • Field Details

  • Constructor Details

  • Method Details

    • elements

      public List<Element> elements(String tagName)
    • elementsNS

      public List<Element> elementsNS(Namespace nameSpace, String tagName)
    • elementsNS

      protected List<Element> elementsNS(String nameSpaceUri, String tagName)
    • element

      public Element element(String tagName)
    • elementNS

      public Element elementNS(Namespace nameSpace, String tagName)
    • add

      public void add(Element element)
    • attribute

      public String attribute(String name)
    • attributes

      public Set<String> attributes()
    • attributeNS

      public String attributeNS(Namespace namespace, String name)
    • attribute

      public String attribute(String name, String defaultValue)
    • attributeNS

      public String attributeNS(Namespace namespace, String name, String defaultValue)
    • composeMapKey

      protected String composeMapKey(String attributeUri, String attributeName)
    • elements

      public List<Element> elements()
    • toString

      public String toString()
      toString in class Object
    • getUri

      public String getUri()
    • getTagName

      public String getTagName()
    • getLine

      public int getLine()
    • getColumn

      public int getColumn()
    • appendText

      public void appendText(String text)
      Due to the nature of SAX parsing, sometimes the characters of an element are not processed at once. So instead of a setText operation, we need to have an appendText operation.
    • getText

      public String getText()
    • collectIds

      public void collectIds(List<String> ids)
      allows to recursively collect the ids of all elements in the tree.