John W. Shipman <[EMAIL PROTECTED]> wrote:

I've rewritten my document "Python and the XML DOM" to
conform to the way the Python 2.3 xml.dom.minidom module
wants you to use factory methods: see section 6, `Creating
a document from scratch'

Actually you haven't quite gone far enough. Document and DocumentType should themselves be created from factory methods. You're supposed to use minidom.getDOMImplementation(), or the 'implementation' property of an existing Document to get a DOMImplementation object, then call createDocument() and createDocumentType() on it.


These constructors work for now, but can't be guaranteed; there are no constructors in the W3C DOM standard itself. Using the constructor for DocumentFragment, on the other hand, could well cause errors (like what you get with Element etc). Use Document.createDocumentFragment().

I would greatly appreciate any comments.

>> XML (eXtended Markup Language) and SGML (Standard General Markup Language)


eXtensible Markup Language and Standard Generalized Markup Language.

Possibly you wanted less nit-picky comments, but you've got to take what you can get eh?

--
Andrew Clover
mailto:[EMAIL PROTECTED]
http://www.doxdesk.com/
_______________________________________________
XML-SIG maillist  -  XML-SIG@python.org
http://mail.python.org/mailman/listinfo/xml-sig

Reply via email to