Unable to parse special characters using NSXMLParser

  • Hi All,

    I'm having problems with NSXMLParser while parsing XML File which contain
    some special characters or Non-UTF Characters,

    My application will get the XML Document data from my server.  I'm creating
    the NSXMLParser with NSData received from Server. Some times it could be
    possible that received NSData may contain special characters such as "Ä?" ,
    then parser stops itself and returns an error saying Invalid Character
    Found. Here is the Exact Error am receiving ---

    *NSXMLParserErrorDomain error 9*

    Please provide your valuable suggestions to solve the problem.

    Thanks in Advance.

    JanakiRam
  • On 16 Oct 2008, at 11:24, JanakiRam wrote:

    > I'm having problems with NSXMLParser while parsing XML File which
    > contain
    > some special characters or Non-UTF Characters,

    How can there be a non-UTF character?

    XML files typically begin with their encoding. I'd guess that your
    file is not in the proper encoding (UTF-8 is usually best).

    David Dunham    A Sharp, LLC
    Voice/Fax: 206 783 7404    http://a-sharp.com
    Efficiency is intelligent laziness.