Skip to content

Madcow Operations XPath Extras

gavinbunney edited this page Feb 15, 2011 · 4 revisions

Madcow Operations - XPath Extras

Ends With

Command madcow:ends-with
Description 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

Command madcow:numbers-only
Description Strips any non-numeric characters from the supplied xpath string
Usage madcow:numbers-only(xpathQuery)
Examples madcow:numbers-only(@id)

Replace All

Command madcow:replace-all
Description 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