I have a Target API that returns XML. Ask is to return selected nodes from XML based on querystring parameter containing list of node names as comma separated string
Example
{url}?fieldlist=n1,n2,n3
the proxy should return just these three child nodes.
Solved! Go to Solution.
You can do this with a bit of XSL magic.
In the attached proxy, you'll find an XSL that expects a parameter fieldlist, tokenizes this parameter, and for each token, will output any direct child of the XML source root element with a matching name (if there are multiple children, it'll output all of them).
The proxy sets a dummy response XML with elements n1,n2,n3,n4 and n5, you can test it by setting query param fieldname to any combination of these names (separated by ',')filterxml-rev2-2018-10-08.zip