XMLAggregate

From GreenVulcano Wiki
Jump to: navigation, search

Description

The element provides the configuration parameters to manage XML document aggregation as a single document.

Its attributes are:

Attribute Type Description
root required Aggregate document root node name.
namespace optional Root node namespace URI.

Is used in ResultProcessor of Parallel Flow.

Example

As an example lets have 'document1':

<doc>
    <element>some text</element>
</doc>

and 'document2':

<doc2>
    <element>some text 2</element>
    <other-element>some other text</other-element>
</doc2>

and 'document3':

<doc3>
    <element>some text 3</element>
    <other-element>some other text</other-element>
</doc3>

with the following configuration:

<XMLAggregate root="aggregated"
              namespace="http://some.url"/>

we get as output the following XML document:

<ns:aggregated xmlns:ns="http://some.url">
    <doc>
        <element>some text</element>
    </doc>
    <doc2>
        <element>some text 2</element>
        <other-element>some other text</other-element>
    </doc2>
    <doc3>
        <element>some text 3</element>
        <other-element>some other text</other-element>
    </doc3>
</ns:aggregated>