Skip to main content
Skip table of contents

XML Text Extractor

The adapter extracts the contents of a node within an XML document as a text document. The node is targeted using an XPath expression.

Extractable elements

You can only extract elements of the CDATA type, attributes, or text.

Properties

Operation

Defines the operation executed by the adapter

Possible values:

  • Extract: Extract the content of a node

Parameters

Adapter

Main adapter class (Do not change!)

Possible values: de.softproject.integration.adapter.xmltextextractor.XMLTextExtractor: Hauptklasse (default)

xpath

XPath expression to select from the input XML document

Possible values: Any valid XPath expression (e.g. Root/Element[1]).

(info) If the XPath expression targets more than one element, an error is issued. To extract more than one element, combine the adapter with the XPath Iterator adapter.

Status values

0

The adapter doesn't output data (anymore). This status can be used as stop criterion of a loop within a Technical Process and indicates that no further data row is available.

1

The adapter outputs a result document.This status can be used as condition to enter a loop  within a Technical Process and indicates that a further data row is available.

-1

An error occurred during the adapter's execution (for details see server log).

Input

The adapter expects any valid XML document as input.

Example input XML document

XML
<RootElement>
	<address>
		<name>John Doe</name>
		<street>42 Main Avenue</street>
		<zip>13579</zip>
		<city>Example town</city>
		<state>Example state</state>
		<country>Example country</country>
	</address>
	<address>
		<name>Jane Doe</name>
		<street>22nd Street</street>
		<zip>84643</zip>
		<city>Example city</city>
		<state>Example state</state>
		<country>Example country</country>
	</address>
</RootElement>

Set adapter parameters:

  • xpath: //address[1]/name

Output

The adapter outputs a text document with processed data.

Example output

XML
John Doe
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.