Wie können wir Ihnen helfen?
< Zurück
Drucken

TransformXML

With a TransformXML node, an XML file is read in and optionally processed (transformed) via an XSL file.
This functionality allows the XML file to be read and dynamically manipulated for a test case that triggers the import and processing of an IDoc in the SAP system.

 

Attributes:

AttributeRequiredDescription
IdYes
Unique Id in the query tree
DependsOnNo
Optional dependency on one or more query nodes
XMLFileYesXML File to be edited
XSLFileNoXSL file with which the XML file is optionally transformed
ColumnNoOptional alternative name of the result column. If not set, the ID will be used as column name.
ParametersNo
Optional parameters that are passed to the XSL file and used to transform the XML file.

 

Example

In this example, the XML file order.xml is processed by the XSL file transform.xsl. These two files are specified in the Data Manager as attachments of the test case.
The XSL file expects 2 parameters (Material and Amount), which are replaced in the XML file.

--- !TransformXML
Id: Transform
DependsOn:
XMLFile: order.xml
XSLFile: transform.xsl
Parameters:
    Material: suxxesso
    Amount: 25

In the example, fixed values are used for the two parameters. However, values from incoming nodes can also be passed.

 

Instructions for the IDoc export from SAP (as XML) and the processing of IDocs
Examples of copying (identity transform) of an XML file and a simple substitution 

Inhaltsverzeichnis