XML/XPath transfer object
XML transfer objects are available as sources and targets. 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 directly configure the transfer object within the connection as described.
After double-clicking on the transfer object, set the following properties:
Section: X-Path elements
| Property | Description |
|---|---|
| Name | Name under which the query appears in the transfer object. |
| X-Path expression | Valid X-Path query, in the simplest case the path to the node (see below) |
| XML Mode | Specifies whether only the content of the query result or also the surrounding tag is output (e.g., Heinrich Mann or <autor>Heinrich Mann</autor>. When writing to the object (creating XML), always specify "Content only" because the structure is already fixed. |
X-Path Placeholder
| Property | Description |
|---|---|
| Parameter Name | Name of the placeholder |
| Default Value | Default value of the placeholder |
Section: Namespaces and Prefixes
| Property | Description |
|---|---|
| Prefix | Unique prefix |
| Namespace | Namespace |
When the XML code is read at design time, all existing namespaces are entered. Use the checkbox to select the namespace that is to be used as the default for XPath queries. If a default is defined, formulate the XPath queries without a prefix; this 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. You can use it to check your XPath expressions at design time. You can then delete the code again if you transfer the XML code dynamically at runtime (transfer object as source) or generate it first (transfer object as target). Of course, you can also leave static code here if this meets your requirements.