The XML format that
xml-to-json consumes is specified both in the XSLT 3.0 specification (www.w3.org/TR/xslt-30/#json-to-xml-mapping) as well as in the XPath and XQuery 3.1 function specification: www.w3.org/TR/xpath-functions/#json.
Basically all elements need to be in the namespace
http://www.w3.org/2005/xpath-functions and are
number etc., to reflect the JSON datatypes.
The error message suggests your input contains an element named
wrapper in no namespace, so that is certainly not the right format for that function. You will need to use additional transformation steps to transform your XML to the one the function expects.
Read more here: Source link