11.12. XPath and Namespaces

An XPath expression is a feature that searches through messages and extracts data from them.
To use namespaces in Xpath, specify which namespace prefixes are to be used in the XPath expression. These prefixes are specified in a comma-separated list in the following format: prefix=uri,prefix=uri.
XPath Namespace-aware Statements:
  1. xpathMatch expr "<expression>" use namespaces "<namespaces>"
  2. xpathEquals expr "<expression>", "<value>" use namespaces "<namespaces>"
  3. xpathGreaterThan expr "<expression>", "<value>" use namespaces "<namespaces>"
  4. xpathLowerThan expr "<expression>", "<value>" use namespaces "<namespaces>"

Note

Make sure these expressions have the expr at the beginning to stop them from clashing with non-XPath aware statements.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.