Skip to content
cgrand edited this page Sep 13, 2010 · 44 revisions

What is Enlive?

Enlive is an extraction and transformation library for HTML and XML documents written in Clojure. It uses CSS-like selectors.

Usual Enlive applications include screenscraping and templating.

The Enlive approach to templating is functional and decouples design and presentation logic.
Each template or template part (snippet) is a plain function thus you can easily compose templates. There is a kind of inversion of control here. In most mainstream templating systems, templates drive the presentation logic. Here the presentation logic drives templates.
Templates are backed by source files which are plain HTML (no special tags or attributes, no code). This allows for easy round-tripping with designers or easy theming of your app.

Need help?

Google group

Selectors

Syntax reference

Tutorial

Getting started

XML limitations

No support for namespaces.