I am talking about what I see when endELement event occurs. I end up with 
tempVal containing a partial element.

Is there some example I can see that does a proper job? Virtually every 
example I have seen seems to be making the same assumption I am...

On Tuesday, March 6, 2012 4:20:10 PM UTC-5, Lew wrote:
>
> SAX parsers, such as you appear to be using, do not guarantee to give all 
> the character data for a given element in a single callback to 
> 'characters()'. Your logic that assumes otherwise is fatally flawed.
>
> You're not guaranteed to have processed the whole element until 
> 'endElement()', of course.
>
> -- 
> Lew
>
> On Tuesday, March 6, 2012 1:09:57 PM UTC-8, RedBullet wrote:
>>
>> I have been debugging this for a while now, and I can only reproduce it 
>> when I run in the Android environment (emulator or device), but 
>> not reproducible in plain old java.
>>
>> The behavior is that I am just PART of a fragment instead of the entire 
>> element. For example
>>
>> ....
>> <Longitude>-71.41000482232</Longitude>
>>
>> What I actually get is just "1000482232".
>>
>> My characters function is the basic:
>> public void characters(char[] ch, int start, int length) throws 
>> SAXException {
>> tempVal = new String(ch,start,length);
>> }
>>
>> No errors or exceptions or warning or anything...
>>
>> It is as if it is doing buffering since it appear to give me fragments 
>> after parsing some 2-4k lines of XML.
>>
>> Any ideas??
>>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to