Tools

Manipulate XML within your script using these Orange Logic tools. You can generate sidecar or status XML files, or create dynamic SOAP calls to external applications.

class XMLTools {
    public static string Stringify()
    public static object Parse()
    public static string Update()
    public static string Delete()
}

Here’s an example of using one of these tools in a Call external API script. This script updates the XML by removing an element, and then it sends the XML to a webhook catcher endpoint.

var xml = XMLTools.Delete(/*XML Text (required) */ "<root> <s>hello world</s> <i>1</i> <o><k>v</k></o> <a>1</a> <a>2</a> <a><o><k>v</k></o></a> </root>", /*XPath text (required) */ "./a[3]")

Utils.ExecuteHttpRequest('https://webhook.site/50d61432-b10e-4353-b759-61250307feba',
{
    Method: 'POST',
    Data: xml
},

// Success callback function
function (oHttp) {
}, 	
// Failure callback function
function (oHttp) {
}	
);

📘

Note

These tools are available beginning in Orange Logic Milan.