How To: Ignore Namespaces and Prefixes with XPath Based Tasks

Several of the the tasks in Sentry utilize XPath for targeting a specific node of an XML document. 

A Sentry use case may call for ignoring prefixes and namespaces while using XPath.  This can be accomplished by using a custom XPath expression with the local-name function.


The local-name function returns the name of the current node or the first node in the specified node set - without the namespace prefix. For more info see:



For the following XML:


<soap:Envelope xmlns:soap="">
<s0:Echo xmlns:s0="">


The following XPath expression matches the Buf element regardless of the namespaces or prefixes:




  • You'll need to manually enter the expression in the Element field.
  • First select a node and click apply, then customize the field with your expression.
  • There may be complications and adjustments to the XPath required if there are multiple nodes at the same level, etc.


Article is closed for comments.