How is arbitrary JSON
converted to arbitrary XML
using BaseX
?
I\'m looking at JsonParser
from BaseX
I think the problem can be solved by the method upstairs. If you only want results, you can do this through some online websites json to xml
Use the (excellent) JSON-Java library from json.org then
JSONObject json = new JSONObject(str);
String xml = XML.toString(json);
toString
can take a second argument to provide the name of the XML root node.
This library is also able to convert XML to JSON using XML.toJSONObject(java.lang.String string)
Check the Javadoc for more information