Skip to content

Instantly share code, notes, and snippets.

View dsedivec's full-sized avatar

Dale Sedivec dsedivec

View GitHub Profile
@dsedivec
dsedivec / gist:199309
Created October 1, 2009 23:04
Example of using c.c.zip-filter.xml
(require '[clojure.xml :as xml]
'[clojure.zip :as zip]
'[clojure.contrib.zip-filter.xml :as zfx])
(def reddit-rss-xml (xml/parse "http://www.reddit.com/.rss"))
(def zipped-xml (zip/xml-zip reddit-rss-xml))
;; xml1-> treats keywords as "search for this tag." xml/node at the
;; end says "return me that one part of the XML map" (format specified