Package com.nt.udc.io.xml
Class CXMLElement
java.lang.Object
com.nt.udc.io.xml.CXMLContentItem
com.nt.udc.io.xml.CXMLElement
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
This class is used to enumerate the contents of a CXMLElement. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CXMLContentItem[]
The XML element's content - an array of objects of type CXMLContentItem.protected int
This member represents the numer of content items.char[]
This member represents the element's name.protected CXMLElement
Reference to the element containing this element. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
static CXMLElement
alloc
(char[] name, CXMLElement parent) void
free()
This function is used for managing freed objects, which we reuse.getEnum()
char[]
final char[]
getName()
final CXMLElement
getPath()
-
Field Details
-
m_parent
Reference to the element containing this element. The reference is null in the case of root-elements. -
m_name
public char[] m_nameThis member represents the element's name.Example: invalid input: '<'Record:ingress> -> name = "Record:ingress"
-
m_content
The XML element's content - an array of objects of type CXMLContentItem. -
m_contentCount
protected int m_contentCountThis member represents the numer of content items.
-
-
Constructor Details
-
CXMLElement
- Throws:
Exception
-
-
Method Details
-
getParent
-
getName
public final char[] getName() -
getFilteredName
public char[] getFilteredName()- Returns:
- A filtered version of an element's name. Strips out newlines.
-
getEnum
-
addToContent
-
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
- 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 classCXMLContentItem
-