[XML-SIG] Printing "quite" pretty DOMs?

James Oakley joakley@solutioninc.com
Thu, 4 Jul 2002 09:44:04 -0300


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On July 4, 2002 08:04 am, Dinu Gherman wrote:
> Now this is actually too pretty in my case! What I'd really
> need is something between the cases above, namely:
>
>     <DESC>
>         <PARA>foo</PARA>
>         <PARA>bar</PARA>
>     </DESC>
>
> i.e. with no extra whitespace added for text inside an ele-
> ment. Has anybody already some snippet to do this or isn't
> it that trivial, maybe?

xml.dom.ext.PrettyPrint(doc, file_object, encoding)

This gives you exactly what you're looking for. It's what I prefer as well.

- -- 
James Oakley
Engineering - SolutionInc Ltd.
joakley@solutioninc.com
http://www.solutioninc.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9JEMZ+FOexA3koIgRAq3tAKCppy4hL7fEQmBLUdsJMJ3tKw7xRwCfSKBp
dpnAfhfa5Mcjf5H3kNPxZ7Y=
=IDe7
-----END PGP SIGNATURE-----