Skip to content

Madcow Operations XPath Extras

gavinbunney edited this page Feb 20, 2011 · 4 revisions

Madcow Operations - XPath Extras

Ends With

Tests if the supplied xpath query has a text result in which the last part of the text matches the supplied string.

Usage

madcow:ends-with(xpathQuery, text)

Examples

madcow:ends-with(@id, 'Suburb')

Numbers Only

Strips any non-numeric characters from the supplied xpath string.

Usage

madcow:numbers-only(xpathQuery)

Examples

madcow:numbers-only(@id)

Replace All

Replaces occurances of a string, with another string within the specified xpath text. Supports Java style regular expressions.

Usage

madcow:replace-all(xpathQuery, replaceThis, withThat)

Examples

madcow:replace-all(@id, 'a', 'A) \-> replace all 'a' with 'A' within @id

Clone this wiki locally