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
@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
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)
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.
Glad my old blog post is still useful :-)
i'm a beginner and your blog let me know a lot about zippers ))), thanks!
@clojurebot IDE
@us3r64 ClojureBot’s role here is to evaluate Clojure code. You do that via the /clj
command...
/clj (clojure-version)
produced that.
i tried to be funny there, i was not expecting an output from it