Skip to content

Instantly share code, notes, and snippets.

@mattdeboard
Created February 29, 2012 20:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattdeboard/8ade2081f472e164064a to your computer and use it in GitHub Desktop.
Save mattdeboard/8ade2081f472e164064a to your computer and use it in GitHub Desktop.
(let [tags (element :add {}
(for [job test-job]
(element :doc {}
(element :field {:name "buid"} (str (:buid_id job)))
(element :field {:name "city"} (:city job))
;; ...<snip a bunch of the same>...
(element :field {:name "uid"} (str (:uid job)))))
)]
(with-open [out-file (java.io.FileWriter. "/tmp/foo.xml")]
(emit tags out-file)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment