[XML-SIG] how to output xml from a python object

Martin v. Loewis martin@v.loewis.de
14 May 2002 00:18:20 +0200


paul@boddie.net writes:

> Having had to maintain code which did lots of print statements (in
> Perl as well, for increased maintenance excitement), I can see lots
> of benefits in not using that approach. Another benefit of the DOM,
> of course, is the random- access nature of the technology - as soon
> as you decide you need to revisit parts of your generated document
> in your program in order to add "extra stuff" (and I'm not saying
> you definitely will, but it's not unheard of), you'll probably end
> up doing a big rewrite of the program to use the DOM anyway.

In the specific case, any "political correct" solution would not have
worked, though - the user had

object.desc = "<p>text</p>"

and expected the final output document to contain this string
literally. How do you get this with the a DOM?

Regards,
Martin