Hello all,<br>I love the etree stuff and I'm excited about the API additions that this team is adding to make it better. Thanks for all your work. That said I'm really new to ElementTree.<br><br>I am using lxml.etree
version 1.3.3 on both Python 2.4.3 and 2.5.1.<br>
<br>I have a question about processing instructions and round trip file processing.<br>Let's say I have a file 'test.xml' containing the following<br><br><?xml version="1.0" encoding="UTF-8"?>
<br><!DOCTYPE project SYSTEM "test.dtd"><br><project><a><b/></a></project><br><br>Then I run these commands<br><br>t1=etree.parse('test.xml')<br>t1.write('testout.xml
', xml_declaration=True)<br><br>testout.xml looks like this:<br><?xml version='1.0' encoding='ASCII'?><br><project><a><b/></a></project><br><br>I see that t1.docinfo.doctype
contains:<br><!DOCTYPE project SYSTEM "test.dtd"><br>
<br>So why isn't the PI written to the file?<br><br>I am parsing/modifying a file for consumption by another program that refuses to load the file without the PI.<br clear="all">Thanks<br>Greg<br><br>-- <br>Linux. Because rebooting is for adding hardware.