on 04-02-2007 11:31 AM
Hi there,
How can i get the index of an unbounded item in an incoming record set message?
For example, suppose my message looks like this:
<Root>
<Record>item_1</Record>
<Record>item_2</Record>
...
<Record>Item_X</Record>
...
</Root>
And i want to know the index of "Item_X" while mapping
Thanks,
Yigal.
Hi,
define your user defined fuction as type queue
this way you will get all values </Record>
as a table and this way you can get index easily
Regards,
michal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just create a UDF of type queue. The input of UDF is the node you want to access (in your example, Record).
In the code, use somehing like:
...
for (int i=0; i< a.length; i++) {
<insert logic here>
}
...
And inside the for loop, you can implement the desired logic, and the variable i will have the index of your node (actually it will have index - 1, since its from 0 until a.length-1 ).
Regards,
Henrique.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.