public enum XmlStreamConstant extends Enum<XmlStreamConstant>
XMLStreamConstants interface.
Makes working with XML stream events more understandable and readable.| Enum Constant and Description |
|---|
ATTRIBUTE
Indicates an event is an attribute
|
CDATA
Indicates an event is a CDATA section
|
CHARACTERS
Indicates an event is characters
|
COMMENT
Indicates an event is a comment
|
DTD
Indicates an event is a DTD
|
END_DOCUMENT
Indicates an event is an end document
|
END_ELEMENT
Indicates an event is an end element
|
ENTITY_DECLARATION
Indicates a Entity Declaration
|
ENTITY_REFERENCE
Indicates an event is an entity reference
|
NAMESPACE
Indicates the event is a namespace declaration
|
NOTATION_DECLARATION
Indicates a Notation
|
PROCESSING_INSTRUCTION
Indicates an event is a processing instruction
|
SPACE
The characters are white space (see [XML], 2.10 "White Space Handling").
|
START_DOCUMENT
Indicates an event is a start document
|
START_ELEMENT
Indicates an event is a start element
|
| Modifier and Type | Method and Description |
|---|---|
static XmlStreamConstant |
forEventCode(int eventCode)
Returns a constant representing given event code or
null,
if theres is no constant for event code. |
int |
getEventCode()
Returns event code of this constant.
|
static XmlStreamConstant |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static XmlStreamConstant[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final XmlStreamConstant START_ELEMENT
StartElementpublic static final XmlStreamConstant END_ELEMENT
EndElementpublic static final XmlStreamConstant PROCESSING_INSTRUCTION
ProcessingInstructionpublic static final XmlStreamConstant CHARACTERS
Characterspublic static final XmlStreamConstant COMMENT
Commentpublic static final XmlStreamConstant SPACE
Characterspublic static final XmlStreamConstant START_DOCUMENT
StartDocumentpublic static final XmlStreamConstant END_DOCUMENT
EndDocumentpublic static final XmlStreamConstant ENTITY_REFERENCE
EntityReferencepublic static final XmlStreamConstant ATTRIBUTE
Attributepublic static final XmlStreamConstant DTD
DTDpublic static final XmlStreamConstant CDATA
Characterspublic static final XmlStreamConstant NAMESPACE
Namespacepublic static final XmlStreamConstant NOTATION_DECLARATION
NotationDeclarationpublic static final XmlStreamConstant ENTITY_DECLARATION
NotationDeclarationpublic static XmlStreamConstant[] values()
for (XmlStreamConstant c : XmlStreamConstant.values()) System.out.println(c);
public static XmlStreamConstant valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant
with the specified nameNullPointerException - if the argument is nullpublic int getEventCode()
public static XmlStreamConstant forEventCode(int eventCode)
null,
if theres is no constant for event code.eventCode - Event code.Copyright © 2013. All Rights Reserved.