public interface XmlTokenTypes
_NODE
" are based
on the node types defined in org.w3c.dom.Node
. They are
redefined here to provide a unified interface for all XML AST token types,
but their names and values are the same as in the Node
interface (except that they are promoted to int
s). Several
additional types are necessary to represent some DOM node data in AST
form, as noted in the following table:
TOKEN TYPE | PURPOSE |
---|---|
PUBLIC_ID | DTD public identifier. This is not a node in DOM, so there is no node type defined for it. |
SYSTEM_ID | DTD system identifier. This is not a node in DOM, so there is no node type defined for it. |
INTERNAL_SUBSET | DTD internal subset. This is not a node in DOM, so there is no node type defined for it. |
ATTR_SET | Artificial AST to hold an element's attributes |
CONTENT | Holds the value text of attribute, CDATA section, comment, processing instruction, and text nodes. Will always be a child of one of these node types. This extra AST level is necessary because DOM nodes have two text slots (one for name, one for value), while ASTs have only one. |
These extra constants are defined above the range of Node types, to prevent collisions.
Modifier and Type | Field and Description |
---|---|
static int |
ATTR_SET
Bundle of attributes for an element
|
static int |
ATTRIBUTE_NODE
Element attribute
|
static int |
CDATA_SECTION_NODE
CDATA section node
|
static int |
COMMENT_NODE
Comment node
|
static int |
CONTENT
Content of node's value string
|
static int |
DOCUMENT_FRAGMENT_NODE
Document fragment node
|
static int |
DOCUMENT_NODE
Document "container"
|
static int |
DOCUMENT_TYPE_NODE
Document type declaration section
|
static int |
ELEMENT_NODE
Element node
|
static int |
ENTITY_NODE
Entity node
|
static int |
ENTITY_REFERENCE_NODE
Entity reference node
|
static int |
INTERNAL_SUBSET
Internal subset within DTD section
|
static int |
NOTATION_NODE
Notation node
|
static int |
PROCESSING_INSTRUCTION_NODE
Processing instruction node
|
static int |
PUBLIC_ID
Public identifier within DTD section
|
static int |
SYSTEM_ID
System identifier within DTD section
|
static int |
TEXT_NODE
Text node
|
static final int ATTRIBUTE_NODE
static final int CDATA_SECTION_NODE
static final int COMMENT_NODE
static final int DOCUMENT_FRAGMENT_NODE
static final int DOCUMENT_NODE
static final int DOCUMENT_TYPE_NODE
static final int ELEMENT_NODE
static final int ENTITY_NODE
static final int ENTITY_REFERENCE_NODE
static final int NOTATION_NODE
static final int PROCESSING_INSTRUCTION_NODE
static final int TEXT_NODE
static final int PUBLIC_ID
static final int SYSTEM_ID
static final int INTERNAL_SUBSET
static final int ATTR_SET
static final int CONTENT