Thursday, August 12, 2010

How to translate data separated by pipe ( | ) in XML format?

You might encounter a scenario in which the child node of an xml contains data separated by some pipe e.g.( | ) and you want to translate it into proper xml structure for further manipulation.

Well,in my previous post i mentioned about pipe ( | ),and in this post i'll tell you how to separate data and translate it into xml.

       For this situation,Oracle SOA suite provides a BPEL xpath manipulation function called
                                                                      ora:translateFromNative( )

The input parameter of this function is a) input variable containing data to be separated by pipe( | ) and
                                                          b) nxsd template which will be   'xsd/filename.xsd' containing nxsd style xsd


You can get the data by using
ora:getChildElement(bpws:getVariableData('Invoke_Array_OutputVariable','ArrayReturn','/ArrayReturn'),1)
where 'Invoke_Array_OutputVariable','ArrayReturn','/ArrayReturn' is the variable containing data separated by pipe and  1 represents the first node...

I am sure this migght be helpfull if you get stuck in same position where i got stuck
          

No comments:

Post a Comment