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, setEventAllocatornewFactory, newFactory, newInstance, newInstancepublic 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
FactoryConfigurationErrorpublic JsonXMLInputFactory(JsonStreamFactory streamFactory)
public JsonXMLInputFactory(JsonXMLConfig config) throws FactoryConfigurationError
FactoryConfigurationErrorpublic JsonXMLInputFactory(JsonXMLConfig config, JsonStreamFactory streamFactory)
public JsonXMLStreamReader createXMLStreamReader(InputStream stream, String encoding) throws XMLStreamException
createXMLStreamReader in class XMLInputFactoryXMLStreamExceptionpublic JsonXMLStreamReader createXMLStreamReader(String systemId, InputStream stream) throws XMLStreamException
createXMLStreamReader in class XMLInputFactoryXMLStreamExceptionpublic JsonXMLStreamReader createXMLStreamReader(String systemId, Reader reader) throws XMLStreamException
createXMLStreamReader in class XMLInputFactoryXMLStreamExceptionpublic JsonXMLStreamReader createXMLStreamReader(Reader reader) throws XMLStreamException
createXMLStreamReader in class XMLInputFactoryXMLStreamExceptionpublic JsonXMLStreamReader createXMLStreamReader(Reader reader, Constants.SCANNER scanner) throws XMLStreamException
XMLStreamExceptionpublic JsonXMLStreamReader createXMLStreamReader(InputStream stream) throws XMLStreamException
createXMLStreamReader in class XMLInputFactoryXMLStreamExceptionpublic JsonXMLStreamReader createXMLStreamReader(InputStream stream, Constants.SCANNER scanner) throws XMLStreamException
XMLStreamExceptionpublic XMLEventReader createXMLEventReader(XMLStreamReader reader) throws XMLStreamException
createXMLEventReader in class XMLInputFactoryXMLStreamExceptionpublic 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 AbstractXMLInputFactorypublic Object getProperty(String name) throws IllegalArgumentException
getProperty in class AbstractXMLInputFactoryIllegalArgumentExceptionpublic void setProperty(String name, Object value) throws IllegalArgumentException
setProperty in class AbstractXMLInputFactoryIllegalArgumentExceptionCopyright © 2005–2019 Apache Software Foundation. All rights reserved.