A hollow voice says "Fool".
Say you have a string containing XML (we won't judge you for how you arrived at this string, it happens).
You wish to access some value inside the structure represented by this string. You could piece together the
multitude of clojure libraries necessary to actually do this seemingly simple task, or you could appeal to
Xyzzy, the original source of all power. This is the route we take.
(require '[xyzzy.core :as xyzzy])
(def blob (xyzzy/parse-xml giant-xml-string))
(xyzzy/text-at blob :keys :into :blob :at :the :path :you :desire)
Need at attribute, not the text value? Use xyzzy/attr-at!
Copyright © 2012 Instrument
Distributed under the MIT License
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close