Even better! Now I can drop the regular expression that did the same thing :)<br><br>Thanks!<br><br><div><span class="gmail_quote">On 9/26/07, <b class="gmail_sendername">Fredrik Lundh</b> <<a href="mailto:fredrik@pythonware.com">
fredrik@pythonware.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Robert Dailey wrote:<br><br>> Hmm, ElementTree.tostring
() also adds a space between the last character<br>> of the element name and the />. Not sure why it is doing this.<br><br>ET is commonly used to generate (X)HTML fragments, and that space<br>provides partial HTML compatibility.
<br><br>since the default serializer never generates CDATA sections, it should<br>be safe to simply do a text.replace(" />", "/>") on the resulting string.<br><br></F><br><br>--<br><a href="http://mail.python.org/mailman/listinfo/python-list">
http://mail.python.org/mailman/listinfo/python-list</a><br></blockquote></div><br>