Skip to content
loevborg edited this page Sep 13, 2010 · 3 revisions

The Parsley selector language is a superset of XPath and CSS3, combined with a small function library.

Here’s what we added:

  • CSS selectors can select attributes using the @ operator. i.e. “li>a @href”
  • Ambiguity is resolved in favor of CSS. i.e. “a div b” is CSS. “number(a) div b” is XPath.
  • XPath functions can take CSS expressions as arguments. i.e. “normalize-space(div p)”
  • You can use the regular expressions, math, etc functions defined at exslt.org e.g. to get the part of the title after the colon, “match(h1, ‘:(.*)’)1
Clone this wiki locally