Skip to content

Instantly share code, notes, and snippets.

@DuqueDeTuring
Created November 27, 2014 14:28
Show Gist options
  • Save DuqueDeTuring/ed0a09ce65b4f9d043d8 to your computer and use it in GitHub Desktop.
Save DuqueDeTuring/ed0a09ce65b4f9d043d8 to your computer and use it in GitHub Desktop.
;; clojure.data.xml/
(let [tags (element :foo {:foo-attr "foo value"}
(element :bar {:bar-attr "bar value"}
(element :baz {} "The baz value")))]
(with-open [out-file (java.io.FileWriter. "/tmp/foo.xml")]
(emit tags out-file)))
;; source: https://github.com/clojure/data.xml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment