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 effbot
Recipients effbot, flox, jeroen.dirks
Date 2010-03-11.14:05:31
SpamBayes Score 0.00024093942
Marked as misclassified No
Message-id <1268316334.22.0.815756247154.issue5100@psf.upfronthosting.co.za>
In-reply-to
Content
Footnote: "iterparse" does things this way mostly to keep the implementation simple and fast; due to buffering, the tree builder are usually ahead of the event generation with up to 16k.  See the note on this page:

http://effbot.org/zone/element-iterparse.htm

and the message it links to for more on this topic.

Your case is a very common use case for "tostring", so it would probably have made sense to make "tostring" skip the tail on the element itself, at least if it's whitespace only.  Guess we could add an option...

But in your case, you can probably just nuke or normalize the "tail" element before writing it out (i.e. set it to None or "\n").
History
Date User Action Args
2010-03-11 14:05:34effbotsetrecipients: + effbot, jeroen.dirks, flox
2010-03-11 14:05:34effbotsetmessageid: <1268316334.22.0.815756247154.issue5100@psf.upfronthosting.co.za>
2010-03-11 14:05:32effbotlinkissue5100 messages
2010-03-11 14:05:31effbotcreate