How to Enable XPath 2.0 in WSO2 ESB

Engineer, Tech Lead and Technopreneur

By default XPath 2.0 is not enabled in WSO2 ESB. XPath 2.0 is supported from ESB 4.5.0 and later versions.

To enable it go to <ESB_HOME>/repository/conf directory and open synapse.properties files.

Uncomment the below line and save the file

Restart the server.

You need to add perfix syn if you need to use methods like get-property() with XPath 2.0. Also note use follwing namespaces values fro ‘syn’ and ‘fn’

xmlns:syn=”http://ws.apache.org/commons/ns/payload” xmlns:fn=”http://www.w3.org/2005/xpath-functions”

Example :

1,246 total views, 2 views today

 

Feel Free to ask questions and share your thoughts