clojure.xml/emit adds newlines before and after the content of an
element, and as far as I can see there is no way to suppress it:

user=> (use 'clojure.xml)
nil
user=> (emit {:tag :a, :content ["b"]})
<?xml version='1.0' encoding='UTF-8'?>
<a>
b
</a>
nil

As whitespace within XML elements is significant, I think that emit
should not add newlines in front and after the actual content.
clojure.contrib.lazy-xml/emit behaves like I would expect:

user=> (use 'clojure.contrib.lazy-xml)
nil
user=> (emit {:tag :a, :content ["b"]})
<?xml version='1.0' encoding='UTF-8'?>
<a>b</a>
nil

I think clojure.xml/emit should behave in the same way as
clojure.contrib.lazy-xml/emit regarding additional whitespace.

Regards
Stephan

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to