Edit: My question is similar to the below question: Converting XML to JSON using XML Schema
But:
- With Java and not Javascript
- In both directions (
XML->JSON
andJSON->XML
) - A general Java library, not related to Node.js
- Do it on-the-fly
Something like String json = convertToJSON(xml, xmlSchema)
and String xml = convertToXML(json, xmlSchema)