View Single Post
  #5 (permalink)  
Old 03-19-2012, 03:55 PM
Pixel // pinterface
Guest
 
Posts: n/a
Default Re: html parsing using css selectors syntax?

Marko Kocic wrote:
> Is there some lisp library which will allow to parse arbitrary (not
> always well formed) HTML using the equivalent of basic CSS selectors?


I know of two.

Russ Tyndal has the very nice css-selectors[1], which is quite handily in
Quicklisp. And there's my own "Oh, Ducks!"[2], which integrates with
cl-unification. You'll almost certainly want the former.

Regardless, as other people have mentioned you'll want to familiarize yourself
with cxml and closure-html, because both of the aforementioned libraries utilize
cxml/chtml.

I'm pretty sure you'll have to put it all together to build the thing you're
after, though. There are some templaty things pre-existing (talcl[3], among
others), but I'm not aware of anything like enlive.

1. https://github.com/AccelerationNet/css-selectors
2. http://code.kepibu.org/Oh,%20Ducks!/
3. https://github.com/AccelerationNet/talcl

--



Reply With Quote