public final class XmlChannelReader extends Object implements XMLStreamConstants, XmlReader
| Modifier and Type | Field and Description |
|---|---|
static int |
STATE_CDATA
Internal State : Characters.
|
static int |
STATE_CHARACTERS
Internal State : Characters.
|
static int |
STATE_CLOSE_TAG_ELEM_NAME_READ
Internal State : Close Tag -> the element name is readed.
|
static int |
STATE_CLOSE_TAG_READ_ELEM_NAME
Internal State : Close Tag -> read element name.
|
static int |
STATE_COMMENT
Internal State : comment.
|
static int |
STATE_DTD
Internal State : DTD.
|
static int |
STATE_DTD_INTERNAL
Internal State : Internal DTD.
|
static int |
STATE_MARKUP
Internal State : Markup.
|
static int |
STATE_OPEN_TAG_ATTR_NAME_READ
Internal State : Open Tag -> the attribute name is reader.
|
static int |
STATE_OPEN_TAG_ELEM_NAME_READ
Internal State : Open Tag -> the name is readed.
|
static int |
STATE_OPEN_TAG_EMPTY_TAG
Internal State : Open Tag -> empty tag.
|
static int |
STATE_OPEN_TAG_EQUAL_READ
Internal State : Open Tag -> read.
|
static int |
STATE_OPEN_TAG_READ_ATTR_NAME
Internal State : Open Tag -> read the attribute name.
|
static int |
STATE_OPEN_TAG_READ_ATTR_VALUE_DOUBLE_QUOTE
Internal State : Open Tag -> Read attribute value with double quote.
|
static int |
STATE_OPEN_TAG_READ_ATTR_VALUE_SIMPLE_QUOTE
Internal State : Open Tag -> Read attribute value with simple quote.
|
static int |
STATE_OPEN_TAG_READ_ELEM_NAME
Internal State : Open Tag -> read the element name.
|
static int |
STATE_PI
Internal State : Processing instruction.
|
ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT| Constructor and Description |
|---|
XmlChannelReader() |
XmlChannelReader(boolean clearCache) |
| Modifier and Type | Method and Description |
|---|---|
void |
forEach(Externalizable object,
AttributeConsumer consumer) |
<T extends XmlReaderContext> |
getContext() |
int |
getDepth()
Returns an integer depth that indicates depth in the xml hierarchy.
|
int |
getEventType()
Returns an integer code that indicates the type of the event the cursor is pointing to.
|
Namespaces |
getNamespaces() |
ProcessingInstruction |
getPIData()
Returns the current Processing Instruction of a PROCESSING_INSTRUCTION event.
|
ProcessingInstruction |
getProlog()
Returns the current Processing Instruction of the prolog.
|
QName |
getQName()
Returns the qualidied name of the current event.
|
CharArray |
getText()
Returns the current value of the parse event as a string, this returns the string value of a CHARACTERS event.
|
int |
next()
Get next parsing event - a processor may return all contiguous character data in a single chunk, or it may split it into several chunks.
|
void |
nextStartOrEndElement()
Go to the next START_ELEMENT or END_ELEMENT.
|
void |
preserveSpace() |
protected void |
reset() |
void |
setBuffer(MappedByteBuffer buf) |
<T extends XmlReaderContext> |
setContext(T context) |
String |
toString() |
public static final int STATE_CHARACTERS
public static final int STATE_MARKUP
public static final int STATE_COMMENT
public static final int STATE_PI
public static final int STATE_CDATA
public static final int STATE_OPEN_TAG_READ_ELEM_NAME
public static final int STATE_OPEN_TAG_ELEM_NAME_READ
public static final int STATE_OPEN_TAG_READ_ATTR_NAME
public static final int STATE_OPEN_TAG_ATTR_NAME_READ
public static final int STATE_OPEN_TAG_EQUAL_READ
public static final int STATE_OPEN_TAG_READ_ATTR_VALUE_SIMPLE_QUOTE
public static final int STATE_OPEN_TAG_READ_ATTR_VALUE_DOUBLE_QUOTE
public static final int STATE_OPEN_TAG_EMPTY_TAG
public static final int STATE_CLOSE_TAG_READ_ELEM_NAME
public static final int STATE_CLOSE_TAG_ELEM_NAME_READ
public static final int STATE_DTD
public static final int STATE_DTD_INTERNAL
public XmlChannelReader()
public XmlChannelReader(boolean clearCache)
public QName getQName()
Returns the qualidied name of the current event.
public final CharArray getText()
Returns the current value of the parse event as a string, this returns the string value of a CHARACTERS event.
public final ProcessingInstruction getPIData()
Returns the current Processing Instruction of a PROCESSING_INSTRUCTION event.
public Namespaces getNamespaces()
getNamespaces in interface XmlReaderpublic void preserveSpace()
preserveSpace in interface XmlReaderpublic <T extends XmlReaderContext> void setContext(T context)
setContext in interface XmlReaderpublic <T extends XmlReaderContext> T getContext()
getContext in interface XmlReaderpublic int next()
Get next parsing event - a processor may return all contiguous character data in a single chunk, or it may split it into several chunks.
By default entity references must be expanded and reported transparently to the application. An exception will be thrown if an entity reference cannot be expanded. If element content is empty (i.e. content is "") then no CHARACTERS event will be reported.public final void nextStartOrEndElement()
Go to the next START_ELEMENT or END_ELEMENT.
nextStartOrEndElement in interface XmlReaderpublic final void setBuffer(MappedByteBuffer buf)
public final int getEventType()
Returns an integer code that indicates the type of the event the cursor is pointing to.
getEventType in interface XmlReaderpublic final int getDepth()
Returns an integer depth that indicates depth in the xml hierarchy.
public final ProcessingInstruction getProlog()
Returns the current Processing Instruction of the prolog.
protected void reset()
public void forEach(Externalizable object, AttributeConsumer consumer)
Copyright © 2017. All rights reserved.