On Wed, Mar 26, 2008 at 9:39 PM, J. Cliff Dyer <[EMAIL PROTECTED]> 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

http://pyxml.sourceforge.net/topics/howto/node14.html

"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.

Timothy
_______________________________________________
XML-SIG maillist  -  XML-SIG@python.org
http://mail.python.org/mailman/listinfo/xml-sig

Reply via email to