What is CLSS?

CLSS is a DOM traversal/search engine using CSS selectors. It uses the Plump DOM.

How To

Load CLSS through Quicklisp or ASDF:

(ql:quickload :clss)

Retrieve nodes using a selector:

(clss:select "img" (plump:parse "<div><img src=\"bla.png\" /><img/></div>"))

CLSS implements Level 3 Selectors and offers most of the features from the spec. Some things were left out as they make no sense outside a CSS context.

Extending CLSS

You can add your own pseudo-selectors to CLSS using DEFINE-PSEUDO-SELECTOR:

(clss:define-pseudo-selector outside-link (node)
    (let ((href (plump:attribute node href)))
      (and href (cl-ppcre:scan "^(http|https)://" href))))

Other Guff

CLSS is licensed under the Artistic License 2.0 and ©2014 TymoonNET/NexT, Nicolas Hafner.
This library can be obtained via git on For questions, patches or suggestions, please contact me via email or open a github issue.

CLSS Package Index