Sometimes we need to create a custom node set from a delimited string value. The following is the one of the way to create the same.
INPUT:
Also Check : Creating XML node srt from delimited string using Transaformation activity
Please give your valuable comment on this post.
Happy Coding
- Bring an Assign activity and add a create-nodeset-from-delimited-string function to the target node and put the parameters as mentioned below.
- First parameter : qname (This is the element name which is generate from the deliminated string)
- Second Parameter : Delimited String
- Third Parameter : Delimiter
- It will generate the number of delimited sting entities to the same number of first parameter element node set.
- We can copy the whole node set using copy list operation in an Assign activity.
- In the below example the function generate the same number of result element node set as in the input parameter has the number of words separated by comma(,).
For Example :
<assign name="AssignInput">
<bpelx:copyList>
<bpelx:from expression="oraext:create-nodeset-from-delimited-string('{http://xmlns.oracle.com/DelimitedStringDemo}result'
,bpws:getVariableData('inputVariable','payload','/client:process/client:input'),',')"/>
<bpelx:to variable="outputVariable" part="payload"
query="/client:processResponse/client:result"/>
</bpelx:copyList>
</assign>
INPUT:
Output:
Also Check : Creating XML node srt from delimited string using Transaformation activity
Please give your valuable comment on this post.