slack-help

Need help navigating this Slack? You're in the right place!
lens 2017-03-17T09:50:45.960740Z

Hi guys! Need help. I got XML structure by clojure.data.xml from some response. How can i shortly get deep elements, without trying something like

(->myxml
    :content
    :tag :sometag
   :content
...and so on

jumar 2017-03-17T11:35:50.045252Z

@lens you'd be better off asking in another channel. However, this article can be useful: http://blog.korny.info/2014/03/08/xml-for-fun-and-profit.html

jumar 2017-03-17T11:36:25.050696Z

I've never used that before, but it can look like this:

(clojure.data.zip.xml/xml-> (clojure.zip/xml-zip (clojure.data.xml/parse-str "<parent><child><names><firstname>Juraj</firstname></names></child></parent>"))
                            :parent
                            :child
                            :names
                            :firstname
                            clojure.data.zip.xml/text)

lens 2017-03-17T11:54:50.219978Z

yeah, thanks, i got help from another channel, and got the same link 🙂, which was very usefull, that solve my problem and make my day.

korny 2017-03-17T11:57:21.244137Z

Glad my old blog post is still useful :-)

đź‘Ť 3
lens 2017-03-17T12:02:17.294121Z

i'm a beginner and your blog let me know a lot about zippers ))), thanks!

us3r64 2017-03-17T22:27:06.064598Z

@clojurebot IDE

seancorfield 2017-03-17T22:44:00.199879Z

@us3r64 ClojureBot’s role here is to evaluate Clojure code. You do that via the /clj command...

seancorfield 2017-03-17T22:44:33.204099Z

/clj (clojure-version) produced that.

us3r64 2017-03-17T22:46:05.215934Z

i tried to be funny there, i was not expecting an output from it