Hi All, <div>I've read that </div><div><br></div><div>"</div><div><span class="Apple-style-span" style="color: rgb(34, 34, 34); font-family: Arial; line-height: 19px; ">Serialising an ElementTree now includes any internal DTD subsets that are part of the document, as well as comments and PIs that are siblings of the root node.</span><br>
</div><div><span class="Apple-style-span" style="color: rgb(34, 34, 34); line-height: 19px;">" (from changelog)</span></div><div><br></div><div>but I've failed to achieve this goal, dtd data is lost:</div><div><br>
</div><div><div> root = lxml.etree.parse(StringIO("""<?xml version="1.0" encoding="utf-8"?></div><div> <!DOCTYPE schema [</div><div> <!ATTLIST reference id ID #REQUIRED></div>
<div> <!ATTLIST joined_values id ID #REQUIRED></div><div> <!ATTLIST file id ID #REQUIRED></div><div> <!ATTLIST lookup id ID #REQUIRED></div><div> <!ATTLIST selector id ID #REQUIRED></div>
<div> <!ATTLIST Column id ID #REQUIRED></div><div> ]></div><div> <schema/></div><div> """))</div><div> print lxml.etree.tostring(root)</div><div>
<br></div><div>prints me </div><div><br></div><div><schema/><br></div><div><br></div><div>What am I doing wrong?</div><div><br></div><div>Thanks in advance,</div><div>Alex</div><br>
</div>