public class JsonXMLStreamReader extends AbstractXMLStreamReader<de.odysseus.staxon.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,
Map<String,String> namespaceMappings)
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, Map<String,String> namespaceMappings) throws XMLStreamException
source - stream sourcemultiplePI - whether to produce <xml-multiple?> PIs to signal array startnamespaceSeparator - namespace prefix separatornamespaceMappings - predefined namespaces (may be null)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<de.odysseus.staxon.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<de.odysseus.staxon.json.JsonXMLStreamReader.ScopeInfo>XMLStreamExceptionCopyright © 2011-2014. All Rights Reserved.