[XML-SIG] XML/python approach to "smooshing docs together"?
Lars Marius Garshol
larsga@garshol.priv.no
12 Nov 2000 14:13:44 +0100
* Martin v. Loewis
|
| It is certainly easy to combine the three XML files in a single
| parse with a good SAX ContentHandler. Use a PyXML
| xml.sax.saxutils.XMLGenerator as a base class, but keep an option in
| it to ignore a sequence of starting and closing tags.
That is one approach, but it's only really useful it you want to parse
the documents only to create a new serialized XML document in the form
of a file.
If you want to make use of the merged document in a Python program it
is better to make a parser filter. See saxutils.XMLFilterBase.
--Lars M.