XML functions
This page describes the additional set of predefined Jsonnet functions for the Data Transformer Script task available in Application Integration.
Before you begin
To use the following predefined functions, you must import the functions
library in your script. Importing the functions
library lets you use both the standard Jsonnet functions and the predefined Data Transformer functions.
Application Integration supports Jsonnet functions library v0.20.0. For information about the Jsonnet standard functions, see Jsonnet Standard Library.
Parse XML
Syntax |
parseXml(xml, format = "badgerfish") |
---|---|
Description | Parses the specified input XML string into a JSON object. |
Input parameter | xml: The input XML string.
format: The output JSON representation format. |
Return type | JSON
|
Output | Returns the JSON object representation of the provided XML string. |
Manifest XML
Syntax |
manifestXml(json, format = "badgerfish", indent_output = false) |
---|---|
Description | Converts the specified input JSON object into a XML string. |
Input parameter | json: The input JSON object.
format: The input JSON representation format. indent_output: Boolean input to indicate if the output XML string should be indented. Default value is |
Return type | STRING
|
Output | Returns the XML string of the provided JSON object representation. |
XSLT Transform
Syntax |
xsltTransform(xml, xsl) |
---|---|
Description | Transform the specified XML string using the specified XSL string. |
Input parameter | xml: The input XML string.
xsl: The input XSL string. |
Return type | STRING
|
Output | Returns the output of the XSLT transformation performed on XML using XSL. |
Recommendation
- Learn how to add and configure a Data Transformer Script task (Preview)