Skip to content

Instantly share code, notes, and snippets.

@solussd
Created January 11, 2012 15:19
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 solussd/1595144 to your computer and use it in GitHub Desktop.
Save solussd/1595144 to your computer and use it in GitHub Desktop.
why doesn't this print the result of {:tag audit-rootkey :attrs {} :content (map to-xml-struct directory-records)} to stdout?
(defn generate-file-audit-xml
"Takes a seq of DirectoryRecords that contains the file audit and outputs an XML string with a
top level element with the value of file-audit/audit-rootkey"
[directory-records]
{:pre [(sequential? directory-records)]}
(let [out *out*]
(-> (binding [*out* out] {:tag audit-rootkey :attrs {} :content (map to-xml-struct directory-records)})
xml/emit
with-out-str)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment