Parsing and sending XML
Last updated
Was this helpful?
Last updated
Was this helpful?
In this article, we'll explore ways of parsing and sending XML in UI Bakery. Review the sections below to learn how to do that.
Navigate to the Custom code tab and specify the following script:
Create an HTTP Request action selecting the GET method and specifying the necessary URL.
Next, turn on the Transform result toggle to open the mapper field and specify the following code:
Instead of the Transform result, you can add a JavaScript Code action as the second step to the HTTP Request action.
Click Execute action.
Navigate to the Custom code tab and specify the following scripts:
Now, create a new action consisting of two steps:
For the first step, add a JavaScript Code action that will generate an XML from JSON:
For the second step, add an HTTP Request action that will send the request:
ā Select POST method and specify the URL
ā For Headers - specify Content-Type
application/xml
ā For Body - {{data}}
, as the result of the first step
Click Execute action.