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 roland
Recipients roland
Date 2008-10-10.14:53:35
SpamBayes Score 1.7538188e-06
Marked as misclassified No
Message-id <1223650418.42.0.473297107812.issue4100@psf.upfronthosting.co.za>
In-reply-to
Content
xml text fields are not read properly when it is encountered in a
'start' event.

During a 'start'-event elem.text returns None, if the text string cross
a page boundary of the file. (this is platform dependent and a typical
value is 8K (8192 byte)).  



This line cause an error if the page size is 8192.
<a>this is a text where X has position 8192 in the file</a>

In most cases this erroneous behaviour can be avoid when elem.tree
always returns the proper value at the 'end'-event.   


Two files are submitted:
bug.py: An excerpted file that produced an error with the submitted xml
file.

bug.xml: An xml file, a little bit more then 8200 bytes. In can of the
page size is greater than 8K.. file should be enlarged. Important is
however that the text should cross the page boundary. Tags and
attributes and attribute values as well are OK

 
I might have misunderstood the documentation of etree, because there are
situations that I have not tested.
/roland
History
Date User Action Args
2008-10-10 14:53:38rolandsetrecipients: + roland
2008-10-10 14:53:38rolandsetmessageid: <1223650418.42.0.473297107812.issue4100@psf.upfronthosting.co.za>
2008-10-10 14:53:37rolandlinkissue4100 messages
2008-10-10 14:53:36rolandcreate