On 19 June 2013 20:32, Stefan Kamphausen <ska2...@gmail.com> wrote: > Take a look at the last tag "wheredidmyspacego". The whitespace between the > span tags gets lost whereas the " dear " in the second example is preserved > including surrounding spaces. > > Is this on purpose and/or expected behavior?
Stefan, I think this is expected behaviour for XML as a whole: whitespace on its own isn't preserved. If you look at your XML, it actually has lots of whitespace other than the 'wheredidmyspacego' element - there's a newline and fifteen spaces between <root> and <ok> which (quite rightly) you don't expect to show up in the output. If whitespace on its own were preserved, you wouldn't be able to use it to lay out your XML like this. See also http://www.usingxml.com/Basics/XmlSpace: "The document contains some white space that delimits various aspects of the XML syntax. When the white space is part of the XML syntax, it is discarded by XML parsers and not passed on to processing applications. XML allows for unbounded white space wherever white space is permitted in the XML syntax. This is useful for pretty printing an XML document." Rob -- -- 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 Note that posts from new members are moderated - please be patient with your first post. 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 --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.