org.alicebot.server.core.parser
Class XMLNode

java.lang.Object
  extended by org.alicebot.server.core.parser.XMLNode

public class XMLNode
extends java.lang.Object

Implements a node of the XML trie created by XMLParser.

Version:
4.1.4
Author:
Thomas Ringate/Pedro Colla

Field Summary
static int CDATA
          Character Data.
static int COMMENT
          XML Comment.
static int DATA
          DATA = Text
static int EMPTY
          XML Empty <tag/>
static int ENDTAG
          </tag>
static int TAG
          XML Tag <tag>
 java.lang.String XMLAttr
          String of attributes associated (only for tags, otherwise "")
 java.util.LinkedList XMLChild
          Pointer to a child trie structure (only for tags, otherwise null).
 java.lang.String XMLData
          Actual data on the node or tag content.
 int XMLType
          Type of the node (TAG, EMPTY, DATA, CDATA, COMMENT, or ENDTAG).
 
Constructor Summary
XMLNode()
          Initializes the node with empty default values.
 
Method Summary
 java.lang.String toString()
          Produces a simple string representation of this node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TAG

public static final int TAG
XML Tag <tag>

See Also:
Constant Field Values

EMPTY

public static final int EMPTY
XML Empty <tag/>

See Also:
Constant Field Values

DATA

public static final int DATA
DATA = Text

See Also:
Constant Field Values

CDATA

public static final int CDATA
Character Data.

See Also:
Constant Field Values

COMMENT

public static final int COMMENT
XML Comment.

See Also:
Constant Field Values

ENDTAG

public static final int ENDTAG
</tag>

See Also:
Constant Field Values

XMLType

public int XMLType
Type of the node (TAG, EMPTY, DATA, CDATA, COMMENT, or ENDTAG).


XMLData

public java.lang.String XMLData
Actual data on the node or tag content.


XMLAttr

public java.lang.String XMLAttr
String of attributes associated (only for tags, otherwise "")


XMLChild

public java.util.LinkedList XMLChild
Pointer to a child trie structure (only for tags, otherwise null).

Constructor Detail

XMLNode

XMLNode()
Initializes the node with empty default values.

Method Detail

toString

public java.lang.String toString()
Produces a simple string representation of this node. Any two nodes with unique contents will produce unique string representations. Two nodes with the same content will produce identical string representations.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of this node