XmlToJson icon indicating copy to clipboard operation
XmlToJson copied to clipboard

An invalid xml can also be converted to json

Open xshengh opened this issue 7 years ago • 1 comments

xml file:

<performance version="1">
	<model name="MTK6771">
	        <scene packageName="common">
		        <subscene SubSceneName="0">
			        <item fd="1111" value="2"></item>
                        </subscene>
		</scene>

It's an invalid xml file without end tag of performance and model. But it can still be converted to a json below: {"performance":{"model":{"name":"MTK6771","scene":{"packageName":"common","subscene":{"SubSceneName":"0","item":{"fd":"1111","valu e":"2"}}}},"version":"1"}}

Maybe some validation should be done before converting the json.

xshengh avatar Apr 26 '18 09:04 xshengh

It may be an error message:

org.xml.sax.SAXParseException; lineNumber: 7; columnNumber: 11; XML document structures must start and end within the same entity.

javadev avatar Jun 16 '21 19:06 javadev