• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSXMLParserDelegateAbortedParseError
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSXMLParserDelegateAbortedParseError


  • Subject: Re: NSXMLParserDelegateAbortedParseError
  • From: Josh Caswell <email@hidden>
  • Date: Tue, 08 Mar 2011 13:13:12 -0800

Hi Kevin,

Thanks for your reply.

Sorry, maybe my explanation is not clear enough (I may have left out
too many details). It's not a network error that I am talking about,
but, as you say, an API error for which the server returns valid XML.

The specifics:
I'm requesting weather data for a location by latitude and longitude.
If I give the server a request that has, for example, a bad latitude,
it will return valid XML, which parses fine, with an error element and
a message describing the problem with the request:

<Data xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:noNamespaceSchemaLocation="http://na.unep.net/swera_ims/WS/SWERA.xsd";><Error>110</Error><ErrorMessage>Latitude
point must be between -90 and 90</ErrorMessage></Data>

If my parser comes upon an Error element, the delegate tells it to get
the ErrorMessage contents and then aborts the parsing. Then the
message ("Latitude point must be between...") is used for an alert
sheet as I described.

I'm just wondering why, after my delegate aborts the parse, the parser
changes the error code.

-- Josh Caswell
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: NSXMLParserDelegateAbortedParseError
      • From: Kevin Bracey <email@hidden>
    • Re: NSXMLParserDelegateAbortedParseError
      • From: glenn andreas <email@hidden>
References: 
 >NSXMLParserDelegateAbortedParseError (From: Kevin Bracey <email@hidden>)

  • Prev by Date: Re: Crash with extra [CFString release] after changing a bound value in NSTextField
  • Next by Date: Re: NSXMLParserDelegateAbortedParseError
  • Previous by thread: NSXMLParserDelegateAbortedParseError
  • Next by thread: Re: NSXMLParserDelegateAbortedParseError
  • Index(es):
    • Date
    • Thread