|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.xml.stream.XMLInputFactory
de.odysseus.staxon.base.AbstractXMLInputFactory
de.odysseus.staxon.json.JsonXMLInputFactory
public class JsonXMLInputFactory
XML input factory for streaming from JSON.
| Field Summary | |
|---|---|
static String |
PROP_MULTIPLE_PI
Whether to use the JsonXMLStreamConstants.MULTIPLE_PI_TARGET
processing instruction to indicate an array start. |
static String |
PROP_NAMESPACE_SEPARATOR
Namespace prefix separator. |
static String |
PROP_VIRTUAL_ROOT
JSON documents may have have multiple root properties. |
| Fields inherited from class javax.xml.stream.XMLInputFactory |
|---|
ALLOCATOR, IS_COALESCING, IS_NAMESPACE_AWARE, IS_REPLACING_ENTITY_REFERENCES, IS_SUPPORTING_EXTERNAL_ENTITIES, IS_VALIDATING, REPORTER, RESOLVER, SUPPORT_DTD |
| Constructor Summary | |
|---|---|
JsonXMLInputFactory()
|
|
JsonXMLInputFactory(JsonStreamFactory streamFactory)
|
|
JsonXMLInputFactory(JsonXMLConfig config)
|
|
JsonXMLInputFactory(JsonXMLConfig config,
JsonStreamFactory streamFactory)
|
|
| Method Summary | |
|---|---|
XMLEventReader |
createFilteredReader(XMLEventReader reader,
EventFilter filter)
|
XMLEventReader |
createXMLEventReader(XMLStreamReader reader)
|
JsonXMLStreamReader |
createXMLStreamReader(InputStream stream)
|
JsonXMLStreamReader |
createXMLStreamReader(InputStream stream,
String encoding)
|
JsonXMLStreamReader |
createXMLStreamReader(Reader reader)
|
JsonXMLStreamReader |
createXMLStreamReader(String systemId,
InputStream stream)
|
JsonXMLStreamReader |
createXMLStreamReader(String systemId,
Reader reader)
|
Object |
getProperty(String name)
|
boolean |
isPropertySupported(String name)
|
void |
setProperty(String name,
Object value)
|
void |
setXMLReporter(XMLReporter reporter)
|
void |
setXMLResolver(XMLResolver resolver)
|
| Methods inherited from class de.odysseus.staxon.base.AbstractXMLInputFactory |
|---|
createFilteredReader, createXMLEventReader, createXMLEventReader, createXMLEventReader, createXMLEventReader, createXMLEventReader, createXMLEventReader, createXMLStreamReader, getEventAllocator, getXMLReporter, getXMLResolver, setEventAllocator |
| Methods inherited from class javax.xml.stream.XMLInputFactory |
|---|
newFactory, newFactory, newInstance, newInstance |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String PROP_MULTIPLE_PI
Whether to use the JsonXMLStreamConstants.MULTIPLE_PI_TARGET
processing instruction to indicate an array start.
If true, this reader will insert a PI with the field
name as PI data.
Note that the element given in the PI may occur zero times, indicating an "empty array".
The default value is true.
public static final String PROP_VIRTUAL_ROOT
JSON documents may have have multiple root properties. However, XML requires a single root element. This property takes the name of a "virtual" root element, which will be added to the stream when reading.
The default value is null.
public static final String PROP_NAMESPACE_SEPARATOR
Namespace prefix separator.
The default value is ':'.
| Constructor Detail |
|---|
public JsonXMLInputFactory()
throws FactoryConfigurationError
FactoryConfigurationErrorpublic JsonXMLInputFactory(JsonStreamFactory streamFactory)
public JsonXMLInputFactory(JsonXMLConfig config)
throws FactoryConfigurationError
FactoryConfigurationError
public JsonXMLInputFactory(JsonXMLConfig config,
JsonStreamFactory streamFactory)
| Method Detail |
|---|
public JsonXMLStreamReader createXMLStreamReader(InputStream stream,
String encoding)
throws XMLStreamException
createXMLStreamReader in class XMLInputFactoryXMLStreamException
public JsonXMLStreamReader createXMLStreamReader(String systemId,
InputStream stream)
throws XMLStreamException
createXMLStreamReader in class XMLInputFactoryXMLStreamException
public JsonXMLStreamReader createXMLStreamReader(String systemId,
Reader reader)
throws XMLStreamException
createXMLStreamReader in class XMLInputFactoryXMLStreamException
public JsonXMLStreamReader createXMLStreamReader(Reader reader)
throws XMLStreamException
createXMLStreamReader in class XMLInputFactoryXMLStreamException
public JsonXMLStreamReader createXMLStreamReader(InputStream stream)
throws XMLStreamException
createXMLStreamReader in class XMLInputFactoryXMLStreamException
public XMLEventReader createXMLEventReader(XMLStreamReader reader)
throws XMLStreamException
createXMLEventReader in class XMLInputFactoryXMLStreamException
public XMLEventReader createFilteredReader(XMLEventReader reader,
EventFilter filter)
throws XMLStreamException
createFilteredReader in class XMLInputFactoryXMLStreamExceptionpublic void setXMLResolver(XMLResolver resolver)
setXMLResolver in class AbstractXMLInputFactorypublic void setXMLReporter(XMLReporter reporter)
setXMLReporter in class AbstractXMLInputFactorypublic boolean isPropertySupported(String name)
isPropertySupported in class AbstractXMLInputFactory
public Object getProperty(String name)
throws IllegalArgumentException
getProperty in class AbstractXMLInputFactoryIllegalArgumentException
public void setProperty(String name,
Object value)
throws IllegalArgumentException
setProperty in class AbstractXMLInputFactoryIllegalArgumentException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||