[XML-SIG] Content is split into two

Timothy Wu 2huggie at gmail.com
Thu Mar 27 05:01:38 CET 2008

On Wed, Mar 26, 2008 at 9:39 PM, J. Cliff Dyer <jcd at unc.edu> wrote:

> The parser will retrieve input in chunks of unspecified size.  There is
> no guarantee that a text block will all get returned at once.  You are
> seeing this problem because the print statement adds a newline after it
> prints.  If you want to see the text itself, without phantom newlines,
> try replacing print with sys.stdout.write().
> Cheers,
> Cliff

Thanks for the help.

Now I see that on page


"You also shouldn't assume that all the characters are passed in a single
function call."

Wow, totally unexpected. Wonder why it's designed as it is? This is
especially weird to me since the string size isn't big (small buffer) and
this add a bit of complexity to the text processing. Now I have to set flag
to make sure that I should finish off when moving out of the tag.

This now all sounds like of de javu, maybe I ran into this before. =/ I
don't process XML that often.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/xml-sig/attachments/20080327/79b0c6eb/attachment.htm 

More information about the XML-SIG mailing list