I am trying to use XML to JSON policy for the below XML node.
<name attrib="attrib1">12345</name>
Gets transformed to below JSON
"name":{ "attrib":"attrib1", "":"12345" }
I wanted to extract the value 12345, since it is coming with a empty key I am not able to access it.
Solved! Go to Solution.
Hi Prathip
You can use the TextNodeName option.
<XMLToJSON name='X2J-1'> <Source>request</Source> <OutputVariable>whatever</OutputVariable> <Options> <TextNodeName>TEXT</TextNodeName> </Options> </XMLToJSON>
There are other options, too. Check the documentation.
Hi Prathip
You can use the TextNodeName option.
<XMLToJSON name='X2J-1'> <Source>request</Source> <OutputVariable>whatever</OutputVariable> <Options> <TextNodeName>TEXT</TextNodeName> </Options> </XMLToJSON>
There are other options, too. Check the documentation.
Thanks it works...