Friday 11 December 2015

How to Add new Node in XML in Siebel

Hello All,

This post is in continuation of my prevoius post http://siebelfoundation.blogspot.qa/2015/12/how-to-get-value-of-xml-node-from-ioxml.html , where i was getting the value of a particular node in XML and based on certain condition resetting its value.
here instead of resetting the value of node i will update the value in new XML element(Node).

The approach is Prety simple:

  1. Need a way to get the XML Hierchy/IO Hierarchy 
  2. Get the value of particular Node in XML/IO Hierarchy
  3. Set the value in a new Node in the Hierarchy.
you can refer the solution for first 2 points in the previous posts, for the third one we will use the same BS Workflow Utility set the value in a new Node.


Set the value in a new Node Points.

Business Service : Workflow Utilities
Method : Echo

In input pass the XMLHierarchy as input, and the value of node which is to be set you can ether use a literal value or any expression for that, the only difference is that if the node you are setting value in already there in Hierarchy then it will update its value and if node is different it will add a new node with the provided value in Hierarchy.

Input Argument :







Here i am adding a new node with some custom value

Input Argument is :
XMLHierarchy.ListOfMember.Member.PointsValue.<Value>

value is :
2*[&Points]

Output Argument :






here we are just returning the XML Output which will contain the XMLHierarchy with modified node value.

the output will be something like ,

<ListOfMember>
<Member>
<Name>ABC</Name>
<Age>30</Age>
<Email>A@B.C</Email>
<Points>1000</Points>
<PointsValue>2000</PointsValue>
.....
</Member>
</ListOfMember>

you could also see the new Node in the watch window during simulation.
Hope this was helpful , cheers ...



No comments:

Post a Comment

Siebel GoTo View - Handling Realtime cases

 Hello All,  We all must have used GoTo view functionality of siebel to navigate to a particular view from current view. What if the require...