SREG Insert Service (com.ibi.agents.XDSregInsertToDocAgent)

Syntax:

com.ibi.agents.XDSregInsertToDocAgent

iIT Service Object:

Description:

This service inserts special register groups into the document. Select a prefix or a namespace for a group of registers and insert them as elements under the specified node. Special register names and values will be inserted as attributes. You can use this service if you need to insert a number of elements into your document, but you do not initially know how many of them will be defined in runtime.

Parameters:

Parameter

Description

XPATH for Parent Node

The parent node.

Element name for the new nodes

Element name for the new nodes.

SREG Prefix

The namespace being used.

Attribute name for keys

An attribute name for the SREG name.

Attribute name for values

An attribute name for the SREG value.

Edges:

The following table lists the available line edges for the SREG Insert Service (com.ibi.agents.XDSregInsertToDocAgent).

Line Edge

Description

OnError

Error

OnSuccess

Success

OnFailure

Failure

OnCustom

  • OnError
  • OnSuccess
  • OnFailure
  • none
  • one
  • many

Example:

The following is a sample input document:

<root>
   <group>
   </group>
   <data>
   ...
   </data>
</root>

The following parameters are defined:

Parameter

Value

XPATH for Parent Node

/root/group

Element name for the new nodes

sreg

SREG Prefix

mysregs

Attribute name for keys

name

Attribute name for values

value

The following special registers are defined:

The following is a sample output document:

<root>
   <group>
       <sreg name="first" value="one" />
       <sreg name="second" value="two" />
       <sreg name="third" value="three" />
   </group>
   <data>
   ...
   </data>
</root>

If running it with <Test>sreg(iwayhome)</Test>, the service successfully inserts iwayhome in the document:

<?xml version="1.0" encoding="UTF-8" ?>
<Test>
   <META test="C:/IWAY70~3/" />
</Test>