[XML-SIG] Simple DOM question (writing DOM)

Gerhard Häring haering_python@gmx.de
Wed, 12 Dec 2001 01:41:15 +0100


I'm quite new to actually using XML and I'm confused. Parsing a XML
document and building a data structure went fine, but now I want to give
my data structure a toxml() method that creates an Element again.

How would I create an element? With the createElement method of the
Document interface? Now, the problem is that I don't have a Document
yet. And if I want to create one, I wouldn't even know how to create an
empty one.

Or is there an example of writing a DOM tree somewhere and I've missed
it?

TIA

Gerhard
-- 
mail:   gerhard <at> bigfoot <dot> de       registered Linux user #64239
web:    http://www.cs.fhm.edu/~ifw00065/    OpenPGP public key id 86AB43C0
public key fingerprint: DEC1 1D02 5743 1159 CD20  A4B6 7B22 6575 86AB 43C0
reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))