The API docs themselves tell you: <http://developer.android.com/reference/org/xml/sax/ContentHandler.html> "The Parser will call this method to report each chunk of character data. SAX parsers may return all contiguous character data in a single chunk, or they may split it into several chunks ..." and "Individual characters may consist of more than one Java char value. There are two important cases where this happens, because characters can't be represented in just sixteen bits. ... Your code should not assume that algorithms using char-at-a-time idioms will be working in character units; in some cases they will split characters. This is relevant wherever XML permits arbitrary characters, such as attribute values, processing instruction data, and comments as well as in data reported from this method. It's also generally relevant whenever Java code manipulates internationalized text; the issue isn't unique to XML."
You've been focusing on the first issue. Make sure you attend to the second one also. -- Lew On Tuesday, March 6, 2012 1:52:26 PM UTC-8, RedBullet wrote: > > 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... > It's a strange assumption when it directly violates the API documentation. You shouldn't assume when you can conclude from evidence and the fundamental instructions. -- Lew -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en