|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Field Summary | |
static int |
ATTRIBUTE
The item type for an attribute. |
static int |
BUILTIN_ENTITY_REFERENCE
The item type for a reference to one of the 5 builtin entities ( < , > ,
& , " ,
' ). |
static int |
CDATA_SECTION
The item type for a CDATA section. |
static int |
CHARACTER_REFERENCE
The item type for a character reference. |
static int |
COMMENT
The item type for a comment. |
static int |
DOCUMENT_TYPE
The item type for a document type declaration. |
static int |
EMPTY_ELEMENT
The item type for an empty element. |
static int |
END_ELEMENT
The item type for the end of an element. |
static int |
END_ENTITY
The item type for the end of the replacement of a general entity. |
static int |
PROCESSING_INSTRUCTION
The item type for a processing instruction. |
static int |
START_ELEMENT
The item type for the start of an element. |
static int |
START_ENTITY
The item type for the start of the replacement of a general entity. |
static int |
TEXT
The item type for characters of data. |
static int |
TOP_LEVEL_WHITESPACE
The item type for a top-level whitespace. |
static int |
UNEXPANDED_ENTITY_REFERENCE
The item type for an unexpanded entity reference. |
Method Summary | |
XmlContext |
getContext()
Returns the context of this item. |
int |
getItemType()
Returns the type of this item. |
java.lang.String |
getLocalName()
Returns the local name of this item, or null if the item does not gave a name. |
XmlLocation |
getLocation()
Returns the location of the first character of the item. |
java.lang.String |
getName()
Returns the name of the this item, or null if the item does not have a name. |
java.lang.String |
getNamespaceUri()
Returns the namespace URI of this item, or null if the item does not have a namespaced URI. |
java.lang.String |
getPrefix()
Returns the prefix of this item, or null if the item does not have a prefix. |
java.lang.String |
getValue()
Returns the value of this item or null if the item does not have a value. |
Field Detail |
public static final int START_ELEMENT
getItemType()
public static final int END_ELEMENT
getItemType()
public static final int TEXT
getItemType()
public static final int ATTRIBUTE
getItemType()
public static final int EMPTY_ELEMENT
EMPTY_ELEMENT
only if the
SHOW_EMPTY_ELEMENT
feature is present. Otherwise,
an empty element will be returned as a
START_ELEMENT
, END_ELEMENT
pair; the
closing >
will be treated as belonging to the
END_ELEMENT
and all the other characters will be
treated as belonging to the START_ELEMENT
.getItemType()
public static final int CDATA_SECTION
CDATA_SECTION
only if the
SHOW_CDATA_SECTION
feature is present. Otherwise,
the characters from the CDATA section will be included in a
TEXT
.getItemType()
public static final int PROCESSING_INSTRUCTION
PROCESSING_INSTRUCTION
only if the SHOW_PROCESSING_INSTRUCTION
feature is
present. Otherwise, processing instructions are skipped.getItemType()
public static final int COMMENT
COMMENT
only if the SHOW_COMMENT
feature is present. Otherwise, comments are skipped.getItemType()
public static final int START_ENTITY
START_ENTITY
entity
is the context of the start of the replacement text rather
that the context of the start of the reference. The context
must reflect the XML or text declaration at the beginning
of the entity if the entity is the document entity
or an external entity and the entity has an XML or text
declaration. The name of the entity will be null if the
entity is the document entity.getItemType()
public static final int END_ENTITY
START_ENTITY
item.getItemType()
public static final int UNEXPANDED_ENTITY_REFERENCE
UNEXPANDED_ENTITY_REFERENCE
only if the
SHOW_UNEXPANDED_ENTITY_REFERENCE
feature is
present. Otherwise, Otherwise, unexpanded entity references are
skipped.getItemType()
public static final int BUILTIN_ENTITY_REFERENCE
<
, >
,
&
, "
,
'
). A reference to a builtin entity is
returned as a BUILTIN_ENTITY_REFERENCE
only if the
SHOW_BUILTIN_ENTITY_REFERENCE
feature is present.
Otherwise, the referenced character will be included in a
TEXT
. The value is the referenced character. The
name is the sequence of characters between the &
and the ;
(exclusive).getItemType()
public static final int CHARACTER_REFERENCE
CHARACTER_REFERENCE
only if the
SHOW_CHARACTER_REFERENCE
feature is present.
Otherwise, the referenced character will be included in a
TEXT
. The value of a
CHARACTER_REFERENCE
is the referenced character
(which will be represented by two Java chars if the the character
code is greater than 0xFFFF, and otherwise by one Java char).
The name of the character reference is the sequence of characters
between the &#
and the ;
(exclusive).getItemType()
public static final int DOCUMENT_TYPE
DOCUMENT_TYPE
only
if the SHOW_DOCUMENT_TYPE
feature is present. Otherwise,
no item will be returned for the document type declaration
and its contents.getItemType()
public static final int TOP_LEVEL_WHITESPACE
TOP_LEVEL_WHITESPACE
only if the
SHOW_TOP_LEVEL_WHITESPACE
feature is present.
Otherwise, no item will be returned for top-level whitespace.
The value is the string of whitespace characters. It is
implementation dependendent how top-level whitespace is chunked
into TOP_LEVEL_WHITESPACE
items.getItemType()
Method Detail |
public int getItemType()
START_ELEMENT
,
END_ELEMENT
,
TEXT
,
ATTRIBUTE
,
EMPTY_ELEMENT
,
CDATA_SECTION
,
PROCESSING_INSTRUCTION
,
COMMENT
,
START_ENTITY
,
END_ENTITY
,
UNEXPANDED_ENTITY_REFERENCE
,
BUILTIN_ENTITY_REFERENCE
,
CHARACTER_REFERENCE
,
DOCUMENT_TYPE
,
TOP_LEVEL_WHITESPACE
public java.lang.String getName()
ATTRIBUTE
,
START_ELEMENT
, END_ELEMENT
,
EMPTY_ELEMENT
,
DOCUMENT_TYPE
,
PROCESSING_INSTRUCTION
,
START_ENTITY
,
END_ENTITY
,
BUILTIN_ENTITY_REFERENCE
,
UNEXPANDED_ENTITY_REFERENCE
or
CHARACTER_REFERENCE
.public java.lang.String getLocalName()
ATTRIBUTE
,
START_ELEMENT
, END_ELEMENT
,
EMPTY_ELEMENT
, DOCUMENT_TYPE
,
PROCESSING_INSTRUCTION
,
START_ENTITY
,
END_ENTITY
,
BUILTIN_ENTITY_REFERENCE
,
UNEXPANDED_ENTITY_REFERENCE
or
CHARACTER_REFERENCE
.public java.lang.String getPrefix()
ATTRIBUTE
, START_ELEMENT
,
END_ELEMENT
, EMPTY_ELEMENT
,
DOCUMENT_TYPE
.public java.lang.String getNamespaceUri()
xml
is
http://www.w3.org/XML/1998/namespace
. The namespace
URI of an attribute that is serving as a namespace declaration is
http://www.w3.org/2000/xmlns/
. An item can have a
non-null namespace URI only if its type is one of
ATTRIBUTE
, START_ELEMENT
,
END_ELEMENT
or EMPTY_ELEMENT
.XmlNamespaces.XML
,
XmlNamespaces.XMLNS
public java.lang.String getValue() throws java.io.IOException
ATTRIBUTE
, TEXT
,
PROCESSING_INSTRUCTION
, COMMENT
,
BUILTIN_ENTITY_REFERENCE
,
UNEXPANDED_ENTITY_REFERENCE
,
CHARACTER_REFERENCE
or
TOP_LEVEL_WHITESPACE
.java.io.IOException
- if an I/O error occurspublic XmlLocation getLocation()
public XmlContext getContext()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |