Parsing and sending XML
Last updated
Last updated
To parse an XML string to a JS Object, follow these steps:
Open the Custom code tab of the app and specify the script:
in your action, add a new JavaScript step to process the result or activate the Transform result toggle to open the mapper field, and specify the code:
To send an XML string from UI Bakery, follow these steps:
in the Custom code tab of the app, specify these scripts:
add a multistep action;
the first step will be a Code action that will generate an XML from JSON, assuming there is an action that returns data to be sent as XML:
the second step will send a request. You need to specify a header Content-Type application/xml
,
and the Body of the request is the result of the first JavaScript step: