Thanks a lot for both responses. I really appreciate it! The zip is really nice.
On Fri, Feb 4, 2011 at 11:39 AM, Despite wrote:
> I like to use zip and zip-filter with xml files. For example (suppose
> clojure.zip is aliased as zip and clojure.contrib.zip-filter.xml is
> aliased as zf):
>
> (
I like to use zip and zip-filter with xml files. For example (suppose
clojure.zip is aliased as zip and clojure.contrib.zip-filter.xml is
aliased as zf):
(def bo-zip (zip/xml-zip (xml/parse "http://api.twitter.com/1/statuses/
friends/barackobama.xml"
Then I can use zip-filters to get the info I
Here is my attempt using enlive:
(require '[net.cgrand.enlive-html :as html])
(import '[java.net URL]))
(def *url* "http://api.twitter.com/1/statuses/friends/barackobama.xml";)
(defn print-friends [url]
(let [data (html/xml-resource (URL. url))]
(doseq [user (html/select data [:user])]
Hello, Can some one show me how to navigate through xml?
I am trying to have some fun with clojure and think of doing a simple
xml navigation, it seems I didn't get the basics and not know how to
do this simple thing in clojure.
For example, I try to get the user id and name of all barackobama
tw