public class JsonXMLInputFactory extends AbstractXMLInputFactory
Modifier and Type | Field and Description |
---|---|
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.
|
ALLOCATOR, IS_COALESCING, IS_NAMESPACE_AWARE, IS_REPLACING_ENTITY_REFERENCES, IS_SUPPORTING_EXTERNAL_ENTITIES, IS_VALIDATING, REPORTER, RESOLVER, SUPPORT_DTD
Constructor and Description |
---|
JsonXMLInputFactory() |
JsonXMLInputFactory(JsonStreamFactory streamFactory) |
JsonXMLInputFactory(JsonXMLConfig config) |
JsonXMLInputFactory(JsonXMLConfig config,
JsonStreamFactory streamFactory) |
Modifier and Type | Method and Description |
---|---|
XMLEventReader |
createFilteredReader(XMLEventReader reader,
EventFilter filter) |
XMLEventReader |
createXMLEventReader(XMLStreamReader reader) |
JsonXMLStreamReader |
createXMLStreamReader(InputStream stream) |
JsonXMLStreamReader |
createXMLStreamReader(InputStream stream,
Constants.SCANNER scanner) |
JsonXMLStreamReader |
createXMLStreamReader(InputStream stream,
String encoding) |
JsonXMLStreamReader |
createXMLStreamReader(Reader reader) |
JsonXMLStreamReader |
createXMLStreamReader(Reader reader,
Constants.SCANNER scanner) |
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) |
createFilteredReader, createXMLEventReader, createXMLEventReader, createXMLEventReader, createXMLEventReader, createXMLEventReader, createXMLEventReader, createXMLStreamReader, getEventAllocator, getXMLReporter, getXMLResolver, setEventAllocator
newFactory, newFactory, newInstance, newInstance
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 ':'
.
public JsonXMLInputFactory() throws FactoryConfigurationError
FactoryConfigurationError
public JsonXMLInputFactory(JsonStreamFactory streamFactory)
public JsonXMLInputFactory(JsonXMLConfig config) throws FactoryConfigurationError
FactoryConfigurationError
public JsonXMLInputFactory(JsonXMLConfig config, JsonStreamFactory streamFactory)
public JsonXMLStreamReader createXMLStreamReader(InputStream stream, String encoding) throws XMLStreamException
createXMLStreamReader
in class XMLInputFactory
XMLStreamException
public JsonXMLStreamReader createXMLStreamReader(String systemId, InputStream stream) throws XMLStreamException
createXMLStreamReader
in class XMLInputFactory
XMLStreamException
public JsonXMLStreamReader createXMLStreamReader(String systemId, Reader reader) throws XMLStreamException
createXMLStreamReader
in class XMLInputFactory
XMLStreamException
public JsonXMLStreamReader createXMLStreamReader(Reader reader) throws XMLStreamException
createXMLStreamReader
in class XMLInputFactory
XMLStreamException
public JsonXMLStreamReader createXMLStreamReader(Reader reader, Constants.SCANNER scanner) throws XMLStreamException
XMLStreamException
public JsonXMLStreamReader createXMLStreamReader(InputStream stream) throws XMLStreamException
createXMLStreamReader
in class XMLInputFactory
XMLStreamException
public JsonXMLStreamReader createXMLStreamReader(InputStream stream, Constants.SCANNER scanner) throws XMLStreamException
XMLStreamException
public XMLEventReader createXMLEventReader(XMLStreamReader reader) throws XMLStreamException
createXMLEventReader
in class XMLInputFactory
XMLStreamException
public XMLEventReader createFilteredReader(XMLEventReader reader, EventFilter filter) throws XMLStreamException
createFilteredReader
in class XMLInputFactory
XMLStreamException
public void setXMLResolver(XMLResolver resolver)
setXMLResolver
in class AbstractXMLInputFactory
public void setXMLReporter(XMLReporter reporter)
setXMLReporter
in class AbstractXMLInputFactory
public boolean isPropertySupported(String name)
isPropertySupported
in class AbstractXMLInputFactory
public Object getProperty(String name) throws IllegalArgumentException
getProperty
in class AbstractXMLInputFactory
IllegalArgumentException
public void setProperty(String name, Object value) throws IllegalArgumentException
setProperty
in class AbstractXMLInputFactory
IllegalArgumentException
Copyright © 2005–2017 Apache Software Foundation. All rights reserved.