on 01-09-2013 2:24 PM
Hello experts
I was using conditions in receiver determination . But I wanted some extra functionality , so I tried to use a complex Xpath expression . It seems to fail to evaluate it . So was wondering which versions of Xpath does 7.1 support.
The expression I was using was
(/HRMD_A06/IDOC/E1PLOGI/E1PITYP/E1P0001/[index-of(/HRMD_A06/IDOC/E1PLOGI/E1PITYP/E1P0001/ABKRS(), ABKRS())[last()]] = S1)
I wanted to get to the value of the element which occurs in a segment , and the segment occurs multiple times .
I want to get the value
Example E1P0001/ABKRS = S1
E1P0001/ABKRS = S2
E1P0001/ABKRS = S3
E1P0001/ABKRS = S4
I want to get the ABKRS which is the last occurrence.
Is my XPath correct to achieve this or PI just doesn't support such complex Paths.
Thank you for your opinions .
Venkat.
Hi Venkat,
Please check this link:
http://www.w3schools.com/xpath/xpath_functions.asp
Returns the number of items in the processed node list Example: //book[last()] |
Please try this:
/HRMD_A06/IDOC/E1PLOGI/E1PITYP/E1P0001/ABKRS[last()]
It looks like idoc message type. You need to prefix the namespace also as per xsd.
Regards,
Beena.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
the xpath is wrong I believe
you should work with EX condition for multiple nodes
so it should look like:
(/HRMD_A06/IDOC/E1PLOGI/E1PITYP/E1P0001/[index-of(/HRMD_A06/IDOC/E1PLOGI/E1PITYP/E1P0001/ABKRS(), ABKRS())[last()]] = S1 EX )
Please have a look at this blog from Shabarish:
Regards,
Michal Krawczyk
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
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.