public interface XMLExtendedStreamReader extends XMLStreamReader
<xs:any>
content using a registered set of root elements.ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT
Modifier and Type | Method and Description |
---|---|
void |
discardRemainder()
Discard the remaining content of an element.
|
<T> T |
getAttributeValue(int index,
Class<T> kind)
Get the attribute value using intelligent type conversion.
|
String |
getId()
Get the XML ID attribute, if any.
|
int |
getIntAttributeValue(int index)
Get the value of an attribute as an integer.
|
int[] |
getIntListAttributeValue(int index)
Get the value of an attribute as an integer list.
|
List<String> |
getListAttributeValue(int index)
Get the value of an attribute as a space-delimited string list.
|
<T> List<? extends T> |
getListAttributeValue(int index,
Class<T> kind)
Get the attribute value as a list using intelligent type conversion.
|
long |
getLongAttributeValue(int index)
Get the value of an attribute as a long.
|
long[] |
getLongListAttributeValue(int index)
Get the value of an attribute as a long integer list.
|
XMLMapper |
getXMLMapper()
|
void |
handleAny(Object value)
Handle an
<xs:any> -type nested element, passing in the given value, returning after the end of the element. |
void |
handleAttribute(Object value,
int index)
Handle an extended attribute, passing in the given value.
|
void |
setTrimElementText(boolean trim)
Whether or not
XMLStreamReader.getElementText() should trim content. |
close, getAttributeCount, getAttributeLocalName, getAttributeName, getAttributeNamespace, getAttributePrefix, getAttributeType, getAttributeValue, getAttributeValue, getCharacterEncodingScheme, getElementText, getEncoding, getEventType, getLocalName, getLocation, getName, getNamespaceContext, getNamespaceCount, getNamespacePrefix, getNamespaceURI, getNamespaceURI, getNamespaceURI, getPIData, getPITarget, getPrefix, getProperty, getText, getTextCharacters, getTextCharacters, getTextLength, getTextStart, getVersion, hasName, hasNext, hasText, isAttributeSpecified, isCharacters, isEndElement, isStandalone, isStartElement, isWhiteSpace, next, nextTag, require, standaloneSet
void handleAny(Object value) throws XMLStreamException
<xs:any>
-type nested element, passing in the given value, returning after the end of the element.
Must be positioned on a START_ELEMENT
or an exception will occur. On return the cursor will be positioned
on the corresponding END_ELEMENT
.value
- the value to pass inXMLStreamException
- if an error occurs (e.g. the given value
does not match the type of the handler for the element, or the element is
unknown)void handleAttribute(Object value, int index) throws XMLStreamException
START_ELEMENT
or an exception will occur.
On return the cursor will be pointing at the same START_ELEMENT
.value
- the value to pass inindex
- the index of the attribute to processXMLStreamException
- if an error occursvoid discardRemainder() throws XMLStreamException
END_ELEMENT
is
encountered. If a START_ELEMENT
is encountered, then recursively consume and ignore
its content as well.XMLStreamException
- if an error occurs.int getIntAttributeValue(int index) throws XMLStreamException
index
- the index of the attributeXMLStreamException
- if an error occursint[] getIntListAttributeValue(int index) throws XMLStreamException
index
- the index of the attributeXMLStreamException
- if an error occursList<String> getListAttributeValue(int index) throws XMLStreamException
index
- the index of the attributeXMLStreamException
- if an error occurslong getLongAttributeValue(int index) throws XMLStreamException
index
- the index of the attributeXMLStreamException
- if an error occurslong[] getLongListAttributeValue(int index) throws XMLStreamException
index
- the index of the attributeXMLStreamException
- if an error occurs<T> T getAttributeValue(int index, Class<T> kind) throws XMLStreamException
T
- the type of the expected objectindex
- the index of the attributekind
- the class of the expected objectXMLStreamException
- if an error occurs<T> List<? extends T> getListAttributeValue(int index, Class<T> kind) throws XMLStreamException
index
- the index of the attributekind
- the class of the expected objectXMLStreamException
- if an error occursString getId() throws XMLStreamException
XMLStreamException
- if an error occursXMLMapper getXMLMapper()
null
void setTrimElementText(boolean trim)
XMLStreamReader.getElementText()
should trim content.
The default is true.trim
- trim if true, don't if falseCopyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.