XQuery/Convert XML to JSON

You can use the JSON output method to convert XML to JSON format. (For an important note on this article, see https://stackoverflow.com/questions/48876292/how-to-use-the-xslt-xquery-serialization-namespace-to-export-to-json/.)