Skip to main content
Skip table of contents

Inline Content Expander

The adapter expands and collapses data segments in XML Documents based on the set parameters.

Properties

Operation

Defines the operation executed by the adapter

Possible values: 

  • ExpandExpand data segments embedded in an XML document. The data segments contain XML data as plain text or Base64-encoded strings and will be expanded and embedded into the input XML document.
  • Collapse: Collapse parts of an XML document into plain text or Base64-encoded strings. The collapsed data segments are embedded into the input XML document.

Parameters

Adapter

Main adapter class (do not change!)

Possible values: de.softproject.integration.adapter.inlinecontentexpanderAdapter: Main class (default)

select

XPath expression to select from the input XML document

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

Format

Format of the data segments

Possible values:

  • BASE64: Set the format to Base64-encoding (default)

  • STRING: Set the format to plain text

Output

Output format of the data segments

Possible values:

  • XML_ONLY: Only processes valid XML structures. In case of invalid structures an error is output. (Default)

  • XML_OR_STRING: Processes XML structures if they are valid, otherwise the data is output as strings.

  • STRING_ONLY: Only processes strings.

encoding

Encoding of the data segments

Possible values:

  • Any valid encoding (e.g. windows-1252)

  • UTF-8: UTF-8 (default)

Status values

0

The XPath expression doesn't reference any element; The input will be output without modification.

1

Adapter was executed successfully

-1

An error occurred during the adapter's execution. Depending on the operation, either the document is output without modification (Collapse) or the corresponding error message is output (Expand).

Input

This adapter accepts any valid XML document as input.

Sample input XML document

XML
<?xml version="1.0" encoding="UTF-8"?>
<Request>
    <Headers>
        <Header>
            <Name>Content-Type</Name>
            <Value>application/xml</Value>
        </Header>
        <Header>
            <Name>Accept</Name>
            <Value>application/xml</Value>
        </Header>
    </Headers>
    <Body><Content>
            <Description>Adress succesfully submitted!</Description>
            <Data>
                <root>
                    <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>
                </root>
            </Data>
        </Content></Body>
</Request>

Adapter parameters set for processing the input:

  • Operation: Collapse
  • select: //Body
  • Format: BASE64
  • Output: XML_ONLY
  • encoding: UTF-8

Output

The adapter outputs an XML document with processed data embedded.

Sample output

XML
<?xml version="1.0" encoding="UTF-8"?>
<Request>
    <Headers>
        <Header>
            <Name>Content-Type</Name>
            <Value>application/xml</Value>
        </Header>
        <Header>
            <Name>Accept</Name>
            <Value>application/xml</Value>
        </Header>
    </Headers>
<Body>PENvbnRlbnQ+DQoJCQk8RGVzY3JpcHRpb24+QWRyZXNzIHN1Y2Nlc2Z1bGx5IHN1Ym1pdHRlZCE8L0Rlc2NyaXB0aW9uPg0KCQkJPERhdGE+DQoJCQkJPHJvb3Q+DQoJCQkJCTxhZGRyZXNzPg0KCQkJCQkJPG5hbWU+Sm9obiBEb2U8L25hbWU+DQoJCQkJCQk8c3RyZWV0PjQyIG1haW4gYXZlbnVlPC9zdHJlZXQ+DQoJCQkJCQk8emlwPjEzNTc5PC96aXA+DQoJCQkJCQk8Y2l0eT5leGFtcGxlIHRvd248L2NpdHk+DQoJCQkJCQk8c3RhdGU+ZXhhbXBsZSBzdGF0ZTwvc3RhdGU+DQoJCQkJCQk8Y291bnRyeT5leGFtcGxlIGNvdW50cnk8L2NvdW50cnk+DQoJCQkJCTwvYWRkcmVzcz4NCgkJCQk8L3Jvb3Q+DQoJCQk8L0RhdGE+DQoJCTwvQ29udGVudD4=
</Body>
</Request>
JavaScript errors detected

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

If this problem persists, please contact our support.