This discussion is archived
3 Replies Latest reply: Oct 15, 2013 4:41 AM by user12559818 RSS

Xpath in BPEL: How to find the "count" of multiple nodes

601082 Newbie
Currently Being Moderated
Hi Guys
I am having a problem(syntax error) in XPath Expression creation.

Using the Batch processing in BPEL I am trying to find out the number of occurences of an XML element (node).

I have done this successfully previously using:


But when i am using the following:


Here there are multiple occurences of the "Item" tag within which the BillOfMaterial/*BillOfMaterialItem* occurs.
'CurrentItem' is a integer type variable.

It is throwing an Error saying Expected ) --which obviously doesnt solves the problem.

The best part is when i am hard coding a numerical value like:


it is Working perfectly fine--showing the number of "BillOfMaterialItem" occurences under the 2nd (or nth for that matter, where n is the numerical) "Item" node.

Please help


  • Correct Answers - 10 points
  • Helpful Answers - 5 points