views:

319

answers:

1

Hi

I am parsing an XML coming from a web server and the parsing sometimes stops with Error code 6. From the documentation, I found out the error is NSXMLParserInvalidHexCharacterRefError.

The character in question is Ĵ. Can someone please tell me how I can prevent NSXMLParser from sending an error if it encounters these characters (or rather, doesn't NSXMLParser support unicode encoding?)

Thanks.

A: 

I ran across a similar issue a little while back, I can't seem to find the documentation right now, but I believe that NSXMLParser will evaluate found characters using whatever encoding is specified by the XML document, if the document has characters that are not supported by that encoding the error will occur.

Could you post a sample XML document so we might see what encoding(if any is specified). Also, could you let us know which element the error occurs on?

jessecurry
Ok. found the issue, thanks to jesse. The XML was not correct. Thanks everyone.
lostInTransit