3 Replies Latest reply on Oct 15, 2013 11:41 AM by user12559818

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

      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