This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author drtomc
Recipients drtomc, loewis
Date 2007-11-05.21:36:50
SpamBayes Score 0.021867558
Marked as misclassified No
Message-id <1194298610.77.0.967785275262.issue1390@psf.upfronthosting.co.za>
In-reply-to
Content
Hi Martin,

You write:
    It's not a bug in toxml, which should always serialize the
    DOM tree if possible.

Right! In this case it is *not* possible. The generated serialization is
not a well formed XML document.

Having just consulted the DOM technical reports, I see that
createComment is specified as not generating any exceptions, so although
it would be quite a sensible place to check that one was not creating an
insane document, probably one should not do the check there. I think
you're right that this *is* a bug in DOM, and I will report it there.

Having said that, I still think that toxml should throw an exception. In
general, if toxml succeeds, I would expect to be able to parse the result.

I can propose a doco change, but I think such would only be a partial
solution. Something like the following addition to the description for
createComment

Note that comments containing the string C{-->} may make the document
unserializable.

cheers,
Tom
History
Date User Action Args
2007-11-05 21:36:51drtomcsetspambayes_score: 0.0218676 -> 0.021867558
recipients: + drtomc, loewis
2007-11-05 21:36:50drtomcsetspambayes_score: 0.0218676 -> 0.0218676
messageid: <1194298610.77.0.967785275262.issue1390@psf.upfronthosting.co.za>
2007-11-05 21:36:50drtomclinkissue1390 messages
2007-11-05 21:36:50drtomccreate