Skip to Content
0

Content Filter XPath compare Header Value

Mar 13 at 12:27 PM

55

avatar image

HI All,

I want to filter the content comparing date with a date node in the content. The date to compare is saved in one of the header variable. Can we access the header variable in the XPath expression? When I used ${header.lastModified} gives me InvalidXPathExpression exception. Tried without curly braces, but the comparison is not working.

Regards,

Anoop

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Praveen Tirumareddy
Mar 13 at 04:01 PM
0

Hi Anoop,

Could you please refer below blog.

https://blogs.sap.com/2017/06/01/sap-cloud-platform-integration-content-filter-in-detail/

hope this helps !

thanks and regards,

Praveen T

Share
10 |10000 characters needed characters left characters exceeded
Nitin Deshpande Mar 14 at 04:18 PM
0

Hello Anoop,

Considering, your input structure is in below way -

<recordset>

<record>

<date>20180314</date>

</record>

</recordset>


Then you can write the Xpath expression as /record/recordset[contains(date,$header.lastmodified)]


Regards,

Nitin Deshpande

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Nitin,

I tried with that approach itself, but was not succesful. I removed header and used $lastModified directly and it worked. :)

Regards,

Anopo

0