Class CXMLElement


public class CXMLElement extends CXMLContentItem
This class represents a XML element token.

A XML element may contain other XML character data or other XML elements. XML elements not contained by other XML elements are called root-elements.

  • Field Details

    • m_parent

      protected CXMLElement m_parent
      Reference to the element containing this element. The reference is null in the case of root-elements.
    • m_name

      public char[] m_name
      This member represents the element's name.

      Example: invalid input: '<'Record:ingress> -> name = "Record:ingress"

    • m_content

      protected CXMLContentItem[] m_content
      The XML element's content - an array of objects of type CXMLContentItem.
    • m_contentCount

      protected int m_contentCount
      This member represents the numer of content items.
  • Constructor Details

  • Method Details

    • getParent

      public final CXMLElement getParent()
    • getName

      public final char[] getName()
    • getFilteredName

      public char[] getFilteredName()
      Returns:
      A filtered version of an element's name. Strips out newlines.
    • getEnum

      public final CXMLElement.CXMLElementEnum getEnum()
    • addToContent

      public void addToContent(CXMLContentItem obj)
    • getPath

      public String getPath()
      Returns:
      A string representing the concatenation of the names of all ascendents of this XML Element, starting with the associated contaning root-element. The names are separated by colons.
    • alloc

      public static CXMLElement alloc(char[] name, CXMLElement parent) throws Exception
      Throws:
      Exception
    • free

      public void free()
      Description copied from class: CXMLContentItem
      This function is used for managing freed objects, which we reuse.
      Specified by:
      free in class CXMLContentItem