(emit x)
(use 'clojure.xml)
;;attrs stores the attributes of a tag and content contains the children
(emit {:tag :parent :attrs {:value "Hello"} :content[
\t{:tag :child1 :attrs {:value "World"}}
\t{:tag :child2 :attrs {:value "Clojure"}}
\t]})
;; prints this to *out*:
<?xml version='1.0' encoding='UTF-8'?>
<parent value='Hello'>
<child1 value='World'/>
<child2 value='Clojure'/>
</parent>