public class JsonXMLStreamReader extends AbstractXMLStreamReader<org.apache.synapse.commons.staxon.core.json.JsonXMLStreamReader.ScopeInfo>
<alice>bob<edgar/></alice>) is not supported.The reader may produce processing instructions
<?xml-multiple element-name?>
to indicate array starts ('[').
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 |
|---|
JsonXMLStreamReader(JsonStreamSource source,
boolean multiplePI,
char namespaceSeparator)
Create reader instance.
|
JsonXMLStreamReader(JsonStreamSource source,
boolean multiplePI,
char namespaceSeparator,
boolean xmlNilReadWriteEnabled)
Create reader instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected boolean |
consume()
Main method to be implemented by subclasses.
|
Boolean |
getBoolean() |
Number |
getNumber() |
boolean |
hasBoolean() |
boolean |
hasNumber() |
getAttributeCount, getAttributeLocalName, getAttributeName, getAttributeNamespace, getAttributePrefix, getAttributeType, getAttributeValue, getAttributeValue, getCharacterEncodingScheme, getElementText, getEncoding, getEventData, getEventName, getEventType, getLocalName, getLocation, getName, getNamespaceContext, getNamespaceCount, getNamespacePrefix, getNamespaceURI, getNamespaceURI, getNamespaceURI, getPIData, getPITarget, getPrefix, getProperty, getScope, getText, getTextCharacters, getTextCharacters, getTextLength, getTextStart, getVersion, hasName, hasNext, hasText, initialize, isAttributeSpecified, isCharacters, isEndElement, isStandalone, isStartDocumentRead, isStartElement, isWhiteSpace, next, nextTag, readAttr, readData, readEndDocument, readEndElementTag, readNsDecl, readPI, readStartDocument, readStartElementTag, require, standaloneSet, toStringpublic JsonXMLStreamReader(JsonStreamSource source, boolean multiplePI, char namespaceSeparator) throws XMLStreamException
source - stream sourcemultiplePI - whether to produce <xml-multiple?> PIs to signal array startnamespaceSeparator - namespace prefix separatorXMLStreamExceptionpublic JsonXMLStreamReader(JsonStreamSource source, boolean multiplePI, char namespaceSeparator, boolean xmlNilReadWriteEnabled) throws XMLStreamException
source - stream sourcemultiplePI - whether to produce <xml-multiple?> PIs to signal array startnamespaceSeparator - namespace prefix separatorxmlNilReadWriteEnabled - Supports reading and writing of XML Nil elements as defined by http://www.w3.org/TR/xmlschema-1/#xsi_nil when the XML/JSON inputs contains nil/null values.XMLStreamExceptionprotected boolean consume()
throws XMLStreamException,
IOException
AbstractXMLStreamReaderreadXXX() methods.
When encountering an element start event, all attributes and namespace delarations
must be consumed too, otherwise these won't be available during start element.consume in class AbstractXMLStreamReader<org.apache.synapse.commons.staxon.core.json.JsonXMLStreamReader.ScopeInfo>true if there's more to readXMLStreamExceptionIOExceptionpublic boolean hasNumber()
true iff the current event data is a number primitivepublic Number getNumber()
ClassCastExceptionpublic boolean hasBoolean()
true iff the current event data is a boolean primitivepublic Boolean getBoolean()
ClassCastExceptionpublic void close()
throws XMLStreamException
close in interface XMLStreamReaderclose in class AbstractXMLStreamReader<org.apache.synapse.commons.staxon.core.json.JsonXMLStreamReader.ScopeInfo>XMLStreamExceptionCopyright © 2005–2019 Apache Software Foundation. All rights reserved.