cl-html-parse

https://github.com/gwkkwg/cl-html-parse.git

git clone 'https://github.com/gwkkwg/cl-html-parse.git'

(ql:quickload :cl-html-parse)
11

Introduction

CL-HTTP-PARSE is a slash and burn port of Franz's phtml HTML parser.

I made a few small changes to the source mainly involving the call to excl:intern* in collect-tag. In particular, all tags are now string-upcased before being interned. There is probably a better solution but I'm not very Allegro savvy.

Any questions or concerns should be directed to me, Gary Warren King at gwking@metabang.com.

Example #1

(html-parse:parse-html “ Parsing HTML is Phun

Why is it phun?

Parsing HTML is phun because angle brackets are better than parentheses.

”)

=⇒

((:HTML (:HEAD (:TITLE “Parsing HTML is Phun”)) (:BODY (:H1 “Why is it phun?”) (:P “Parsing HTML is phun because angle brackets are better than parentheses.”))))

Example #2

(html-parse:parse-html )

=⇒ ((:HTML …))