Node Set Extract Service (com.ibi.agents.XDNodeSetExtractAgent)

Syntax:

com.ibi.agents.XDNodeSetExtractAgent

iIT Service Object:

misc: Node Set Extract Agent

Description:

This service creates a new document based on a node or set of nodes in the original input document.

Parameters:

Parameter

Description

XPATH Expression *

The XPath expression which represents the node set.

Root name

Optional root for multiple children.

Edges:

The following table lists the available line edges for the Node Set Extract Service (com.ibi.agents.XDNodeSetExtractAgent).

Line Edge

Description

OnError

Error

OnSuccess

Success

OnFailure

Failure

OnCustom

  • OnError
  • OnSuccess
  • OnFailure
  • fail_parse

Example:

The best application of the Node Set Extract service would be to extract the sub-part of an incoming XML document. If you provide the XPath location for the node where the extraction begins, you will receive an output of the XML sub-tree from the original document with the specified node as a root.

In the following example, the XPath expression is specified as Test/attachment/. The incoming document consists of the following:

<Test><hello>hi</hello><attachment><a>555</a></attachment></Test>

The Node Set Extract service will return a result of the edge as success, along with the following output document:

<?xml version="1.0" encoding="UTF-8" ?>
<attachment>
   <a>555</a>
</attachment>