Thank you both for your responses! I think I will try just removing these characters.
On Jan 28, 9:14 am, "Brad Gies" <[email protected]> wrote: > Well. the best thing to do would be to escape those characters at the > server that sends the document, but if that is not possible then you could > download the document into a Stream, escape them there, or even remove them, > and then pass it to the SAX parser. Later, if you display the contents, you > would have to unescape the contents before you display it. > > Sincerely, > > Brad Gies > > ----------------------------------------------------------------- > > Brad Gies > > 27415 Greenfield Rd, # 2, > > Southfield, MI, USA > > 48076 > > www.bgies.com www.truckerphone.com > > www.EDI-Easy.com www.pricebunny.com > > ----------------------------------------------------------------- > > Moderation in everything, including abstinence > > _____ > > From: [email protected] > [mailto:[email protected]] On Behalf Of Tim Bray > Sent: Tuesday, January 27, 2009 3:21 PM > To: [email protected] > Subject: [android-developers] Re: SAXParser getting stuck on certain > characters > > On Tue, Jan 27, 2009 at 12:10 PM, 3D <[email protected]> wrote: > > I'm using a SAXParser to parse an XML document and its getting stuck > on certain symbols like the 'trademark' symbol and I think even double- > quotes ". I really don't need these characters so it would be fine if > the parser just skips over these. Instead it throws an exception and > quits parsing the document. What can I do? > > XML is very fussy about character encoding. If your supposedly XML doc has > malformed characters (for example, if some UTF-8 got dropped into what you > think was ASCII, or ISO-8859 into UTF-8), well, it's not XML, sorry, and the > software won't let you do that. This is controversial (many people have > historically thought it's OK to ignore internationalization problems) but > it's the way it is, you're stuck with it. > > There are other parsers like TagSoup and one in xmllib2 that will let you > bypass breakage and go on working, but they're pretty big chunks of code. > -Tim --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

