[XML-SIG] minidom .toxml() brokenness

Mike Brown mike at skew.org
Thu Jul 7 00:47:18 CEST 2005

In 4Suite we have a fairly robust and speedy set of DOM serialization 
routines. To date, we've made sure it works equally well with both minidom and 
Domlette. Is there any interest in porting this into minidom as a replacement 
for the buggy .toxml()? Seems like it would alleviate a bit of frustration.

In 4Suite, the public interface is the Print() and PrettyPrint() functions in 
Ft.Xml.Domlette; you just call one or the other, passing in what you want to 
serialize, and they'll walk the DOM, generating SAX-like events that are 
handled by an instance of the right kind of serializer. The walker detects the 
type of DOM (HTML or XML) automatically, but this can be overridden to force a 
certain kind of output. The user can also choose the output stream (file-like 
object) and character encoding, of course.

(user functions and DOM walker)

(DOM walker handlers for different kinds of serialization)

(entity/char ref-aware stream writer needed by all of the above)
current version (a Python C extension only):
last pure-Python version (no longer maintained, but is just 1 patch behind
the C version, presently):


More information about the XML-SIG mailing list