Skip to main content

XML/XPath Transfer Object

XML transfer objects are available as sources and destinations. XPath queries can be used to extract elements from XML files or write them to XML files. No plug-in configuration is necessary; you can configure the transfer object directly within the flow as described.

After double-clicking the transfer object, set the following properties:

Section: XPath Elements

PropertyDescription
NameThe name under which the query appears in the transfer object.
XPath ExpressionValid XPath query; in the simplest case, the path to the node (see below)
XML ModeSpecifies whether only the content of the query result or also the enclosing tag will be output (e.g., Heinrich Mann or <autor>Heinrich Mann</autor>). When writing to the object (generating XML), “Inner XML” must always be specified because the structure is already fixed.

XPath Placeholders

PropertyDescription
Parameter NameName of the placeholder
Default ValueDefault value of the placeholder

Section: Namespaces and Prefixes

PropertyDescription
PrefixUnique prefix
NamespaceNamespace

When the XML code is parsed at design time, all existing namespaces are entered. Use the checkbox to select the namespace that should be used as the default for XPath queries. If a default is defined, formulate the XPath queries without the prefix; it will be added automatically. However, you must specify the prefixes in the source code.

Section: XML Code

The multi-line field is used to enter XML code. At design time, you can use it to test your XPath expressions. You can then delete the code again if you pass the XML code dynamically at runtime (transfer object as source) or generate it at runtime (transfer object as destination). Of course, you can also leave static code here if that meets your requirements.