Generating xml tag using JSON to XML policy in Apigee

Hello Everyone,

I am trying to generate xml data for my input json data using JSON to XML policy

My request:

"Schinfo":[{"amt":"23","code":"15","otp": "Z"}]

Code which I am using:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<JSONToXML async="false" continueOnError="false" enabled="true" name="JSON-to-XML-2">
    <DisplayName>JSON to XML-1</DisplayName>
    <Source>request.content</Source>
    <OutputVariable>serializer</OutputVariable>
    <Properties/>
    <Options>
        <OmitXmlDeclaration>true</OmitXmlDeclaration>
        <ArrayRootElementName>ROOT</ArrayRootElementName>
        <ArrayItemElementName>SchInfo</ArrayItemElementName>
    </Options>
</JSONToXML>

My Response:

<Root> 
<Schinfo> 
<Code>15</code> 
<Opt>Z</SchOptCode> 
<amt>101</amt>
  </Schinfo> </Root>

But My expected xml data should be in below format

<ROOT> 
<Schinfo> 
<Code>1565</code> 
<Opt>Z</SchOptCode> 
<amt>101</amt>
  </Schinfo> </ROOT>

Root tag should in caps <ROOT>

Can anyone please on this.

Thank You,

Lakshmi Motupalli

0 0 43
0 REPLIES 0