howto force a root element in JSONToXML?

How can i force a root element in XML output of JSONToXML even when my input JSON has only one element?

0 2 97
2 REPLIES 2

When there is just one element, then there is no way to do what you are describing, using only the JSONToXML policy. YOU CAN do what you want with an additional policy.

EITHER

  • a preceding policy that wraps the input JSON in another layer

    - OR -
  • a subsequent policy that wraps the output XML in your preferred root element

When there is just one element, then there is no way to do what you are describing, using only the JSONToXML policy. YOU CAN do what you want with an additional policy.

EITHER

  • a preceding policy that wraps the input JSON in another layer

    - OR -
  • a subsequent policy that wraps the output XML in your preferred root element