Skip to content

Instantly share code, notes, and snippets.

@arohner arohner/gist:1168833
Created Aug 24, 2011

What would you like to do?
Clojure zippers with HTML
;; requires [org.ccil.cowan.tagsoup/tagsoup "1.2"]
(defn startparse-tagsoup [s ch]
(let [p (new org.ccil.cowan.tagsoup.Parser)]
(. p (setContentHandler ch))
(. p (parse s))))
(defn parse-html-string [html]
(xml/parse (new org.xml.sax.InputSource
(new html))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.