pdk.flow.Xml

contains functions to operate with XML variables

This functions are based on Java org.w3c.dom package classes.

https://docs.oracle.com/en/java/javase/11/docs/api/java.xml/org/w3c/dom/package-summary.html

You can always rely on Java documentation and examples!

All functions


mappingToVariable

parses a simple XML document provided in a pdk.core.String format and assigns the parsed data to a variable.

Please use this function only for simple XMLs. For complex XMLs, use functions from the pdk.flow.xml.* packages.

Arguments:

Result:

  • No variable is returned. The input variable contains data from xml

Possible exceptions

Example:

xmlAsString :: String = 
"<NewOrder><id>1</id><count>3</count><price>10.99</price></NewOrder>";

orderVariable :: Order = {
    "id": NULL,
    "count": NULL,
    "price": NULL
}

mappingToVariable(xmlAsString, orderVariable) :: void -> 
orderVariable = {
    "id": 1,
    "count": 3,
    "price": 10.99
}

Last updated