[XML-SIG] Better recipe for saving a file with a doctype declaration?
Mike C. Fletcher
mcfletch@rogers.com
Fri, 17 Jan 2003 11:47:46 -0500
Okay, thanks for the confirmation. I am actually using 4suite, and have
decided to just let 4xslt handle the encoding for now (too many other
projects on the go to worry about it) :) .
Enjoy,
Mike
Martin v. Löwis wrote:
>"Mike C. Fletcher" <mcfletch@rogers.com> writes:
>
>
>
>>I'm using the following to write out my xml document with a doctype
>>declaration. Is this the preferred way to go about it?
>>
>>
>
>If you are using the DOM: Sure! If you need more stuff in the DOCTYPE
>declaration (such as an internal subset), you could also write it out
>yourself, and then only print the document root.
>
>
>
>>and on a related note, how does one specify the encoding for the
>>document when writing (e.g. as "ISO-8859-1")?
>>
>>
>
>If you have the latest PyXML, and if you are using minidom, you can
>use the encoding= argument of .toxml.
>
>Regards,
>Martin
>
>
>_______________________________________________
>XML-SIG maillist - XML-SIG@python.org
>http://mail.python.org/mailman/listinfo/xml-sig
>
>
>
--
_______________________________________
Mike C. Fletcher
Designer, VR Plumber, Coder
http://members.rogers.com/mcfletch/