update xml attribute value

2011-06-02 Thread siyu798
Hi, Does anyone know how to update xml element attribute value on the zipper data structure? I have something like root element1 name=x1 description=d1/ element2 name=x2 description=d2/ /root (:require (clojure [xml :as xml] [zip :as zip]) [clojure.contrib.zip-filter.xml :as

Re: update xml attribute value

2011-06-02 Thread Allen Johnson
Does anyone know how to update xml element attribute value on the zipper data structure? I have something like root     element1 name=x1 description=d1/     element2 name=x2 description=d2/ /root (:require (clojure [xml :as xml] [zip :as zip])      [clojure.contrib.zip-filter.xml :as zf])

Re: update xml attribute value

2011-06-02 Thread siyu798
Thanks Allen, it works, I did not know the loc can be treated like a hash. siyu -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be

Re: update xml attribute value

2011-06-02 Thread Allen Johnson
Thanks Allen, it works, I did not know the loc can be treated like a hash. 'loc itself isn't a map even though zip/edit makes it seem that way. Behind the scenes zip/edit calls (zip/node loc) which will return a map, at least in the case of this xml example. zip/edit then applies the function