XmlToJson
                                
                                
                                
                                    XmlToJson copied to clipboard
                            
                            
                            
                        An invalid xml can also be converted to json
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.
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.