Re: [XML-SIG] Writing XML files with ElementTree

2007-03-22 Thread Kent Tenney
Fredrik Lundh pythonware.com> writes: > > Kent Tenney wrote: > > > write() says > > > >elif encoding != "utf-8" and encoding != "us-ascii": > >file.write("\n" % encoding) > > > > How do I get the declaration written if I want > > encoding to be utf-8 ? > > since it's usually not ne

Re: [XML-SIG] Writing XML files with ElementTree

2007-03-20 Thread Fredrik Lundh
Kent Tenney wrote: > write() says > >elif encoding != "utf-8" and encoding != "us-ascii": >file.write("\n" % encoding) > > How do I get the declaration written if I want > encoding to be utf-8 ? since it's usually not needed (the declaration is optional if the file's using UTF-8 or a

[XML-SIG] Writing XML files with ElementTree

2007-03-20 Thread Kent Tenney
Howdy, I don't understand how ET provides an XML Declaration as the file output by ElenemtTree.write() write() says elif encoding != "utf-8" and encoding != "us-ascii": file.write("\n" % encoding) How do I get the declaration written if I want encoding to be utf-8 ? Do I need to m