Created
May 7, 2012 07:37
-
-
Save ApigeeSamples/2626512 to your computer and use it in GitHub Desktop.
XML to JSON
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<XMLToJSON name="mypolicy"> | |
<Source>request</Source> | |
<OutputVariable>response</OutputVariable> | |
<Options> | |
<RecognizeNumber>true</RecognizeNumber> | |
<RecognizeBoolean>true</RecognizeBoolean> | |
<RecognizeNull>true</RecognizeNull> | |
<NullValue>NULL</NullValue> | |
<NamespaceSeparator>%</NamespaceSeparator> | |
<NamespaceBlockName>#namespaces</NamespaceBlockName> | |
<DefaultNamespaceNodeName>&</DefaultNamespaceNodeName> | |
<TextAlwaysAsProperty>false</TextAlwaysAsProperty> | |
<TextNodeName>TEXT</TextNodeName> | |
<AttributeBlockName>ATT_BLOCK</AttributeBlockName> | |
<AttributePrefix>@</AttributePrefix> | |
<OutputPrefix>PREFIX_</OutputPrefix> | |
<OutputSuffix>_SUFFIX</OutputSuffix> | |
</Options> | |
</XMLToJSON> | |
<!--Note that you can use format definition to configure the options. The format definition contains all the <options> elements mentioned in the above example (see the below example).--> | |
<XMLToJSON name="mypolicy"> | |
<Source>request</Source> | |
<OutputVariable>response</OutputVariable> | |
<Format>myFormat</Format> | |
</XMLToJSON> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment