staxon icon indicating copy to clipboard operation
staxon copied to clipboard

JsonXMLStreamReader does not allow to set any XML version (nor encoding)

Open victornoel opened this issue 8 years ago • 2 comments

Hi,

Apparently, when using a JsonXMLStreamReader, getVersion() and getCharacterEncodingScheme() always return null.

In some case this can be problematic, for example I got confronted to this bug: https://bugs.openjdk.java.net/browse/JDK-8016914.

It could be great if it was possible for the user to give values to return for these information. For example via a configuration property? I'm not sure how :)

victornoel avatar Jan 20 '17 11:01 victornoel

However, returning null is correct according to the StAX spec because there is no XML declaration.

beckchr avatar Jan 23 '17 14:01 beckchr

Yes I know :)

It's more of a feature request than a bug, I guess it could make sense to decide which version of XML should be outputed from a JSON to XML conversion? Not sure if it is the usual way to do it though…

victornoel avatar Jan 23 '17 14:01 victornoel