Great, thanks!<br><br><div class="gmail_quote">2008/10/25 Stefan Behnel <span dir="ltr"><<a href="mailto:stefan_ml@behnel.de">stefan_ml@behnel.de</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi,<br>
<div><div></div><div class="Wj3C7c"><br>
Alex Klizhentas wrote:<br>
> Hi All, I've read that<br>
> "<br>
> Serialising an ElementTree now includes any internal DTD subsets that are<br>
> part of the document, as well as comments and PIs that are siblings of the<br>
> root node.<br>
> " (from changelog)<br>
><br>
> but I've failed to achieve this goal, dtd data is lost:<br>
><br>
> root = lxml.etree.parse(StringIO("""<?xml version="1.0"<br>
> encoding="utf-8"?><br>
> <!DOCTYPE schema [<br>
> <!ATTLIST reference id ID #REQUIRED><br>
> <!ATTLIST joined_values id ID #REQUIRED><br>
> <!ATTLIST file id ID #REQUIRED><br>
> <!ATTLIST lookup id ID #REQUIRED><br>
> <!ATTLIST selector id ID #REQUIRED><br>
> <!ATTLIST Column id ID #REQUIRED><br>
> ]><br>
> <schema/><br>
> """))<br>
> print lxml.etree.tostring(root)<br>
><br>
> prints me<br>
><br>
> <schema/><br>
<br>
</div></div>Time machine strikes again, I just fixed this fifteen minutes ago and was just<br>
in the middle of testing it. :)<br>
<br>
Here's a patch.<br>
<font color="#888888"><br>
Stefan<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Regards,<br>Alex<br>