OL Learn

Value from last transaction in XML

I would like to extract the payDate value under payments\payList tag from below XML.
However, some records will have the multiple payList being passing in and we just want the value from last payList.
Besides, some records will have the possibility of not having any record of payments.

Please advise.


Extract the field as you would want a single field, then change the index on payList element in XPath expression to last(), eg.