libsgml
I can feel that enthusiasm flowing back slowly now...
libsgml is a fast, lightweight state machine SGML parser capable of parsing HTML, XML, and most other markup languages in their most elementary forms. It natively supports parsing HTML and XML documents into a tree format (DOM). All other markup languages may be parsed via a system of callbacks.