[XML-SIG] an example of generating XML?
Matt Gushee
Matt Gushee <mgushee@havenrock.com>
Tue, 10 Sep 2002 09:28:21 -0600
On Tue, Sep 10, 2002 at 08:19:08AM -0400, Thomas B. Passin wrote:
> >
> > > Here is a minimal example that works, though without error handling.
> >
> > Almost works, you mean?
> >
>
> Yes, I accidentally left off an import statement.
Leaving me to provide it? Alright, if you insist:
from xml.dom import implementation
> > implementation?
> >
>
> It is defined in dom\__init__.py (as illustrated in test_document.py). And
> the code runs as expected on my system, when the import statement isn not
> cut out. Although, as I actually look at that part of __init__.py, I see
> that it really likes to set implementation to
>
> HTMLDOMImplementation.HTMLDOMImplementation()
Yes, I've noticed that ... and I suppose there must be a good reason,
though I can't imagine what. That's why I generally use
from xml.dom import getDOMImplementation
impl = getDOMImplementation()
which (at least on my system) returns an XML DOM parser, usually
minidom.
--
Matt Gushee
Englewood, Colorado, USA
mgushee@havenrock.com
http://www.havenrock.com/