Option to remove root element in JSON to XML policy

Hi All,

I want to remove Root element from XML response after converting from Json to XML.

Root element is directly added to response even i havent added Tag and I am finding a way to remove it from response with in the policy.

Can any one help on this?

Just FYI:

==

specifies the root element name when you convert from JSON, which does not have a named root element, to XML

==

https://docs.apigee.com/api-platform/reference/policies/json-xml-policy#optionsobjectrootelementname

 

general inquiry why you want to remove root element? An XML document cannot be well-formed without a root node.

2 Likes