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 ('['
).
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.
|
java.lang.Boolean |
getBoolean() |
java.lang.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, toString
public JsonXMLStreamReader(JsonStreamSource source, boolean multiplePI, char namespaceSeparator) throws javax.xml.stream.XMLStreamException
source
- stream sourcemultiplePI
- whether to produce <xml-multiple?>
PIs to signal array startnamespaceSeparator
- namespace prefix separatorjavax.xml.stream.XMLStreamException
public JsonXMLStreamReader(JsonStreamSource source, boolean multiplePI, char namespaceSeparator, boolean xmlNilReadWriteEnabled) throws javax.xml.stream.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.javax.xml.stream.XMLStreamException
protected boolean consume() throws javax.xml.stream.XMLStreamException, java.io.IOException
AbstractXMLStreamReader
readXXX()
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 readjavax.xml.stream.XMLStreamException
java.io.IOException
public boolean hasNumber()
true
iff the current event data is a number primitivepublic java.lang.Number getNumber()
java.lang.ClassCastException
public boolean hasBoolean()
true
iff the current event data is a boolean primitivepublic java.lang.Boolean getBoolean()
java.lang.ClassCastException
public void close() throws javax.xml.stream.XMLStreamException
close
in interface javax.xml.stream.XMLStreamReader
close
in class AbstractXMLStreamReader<org.apache.synapse.commons.staxon.core.json.JsonXMLStreamReader.ScopeInfo>
javax.xml.stream.XMLStreamException
Copyright © 2005-2020 Apache Software Foundation. All Rights Reserved.