• 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: Asynchronous downloading and parsing of XML
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Asynchronous downloading and parsing of XML


  • Subject: Re: Asynchronous downloading and parsing of XML
  • From: Mikkel Islay <email@hidden>
  • Date: Mon, 08 Aug 2011 18:59:08 +0200

Thanks for the explanation, Jens too.
The hint that NSXMLParser has that behaviour is that it accepts an NSInputStream, or that it relies on a delegate for communicating "parse-events"?

Mikkel


On 8 Aug 2011, at 10:34, Andreas Grosam wrote:

> No. Asynchronous routines can be implemented above a blocking interface. Blocking and asynchronous interfaces work well together, and you may not even notice the existence of a blocking interface since it is working under the hood as an implementation detail.
>
> For instance the parser *could* (we don't know) be implemented as a "recursive decent" parser. This kind of parser will effectively require that the parsing routine blocks, when there is no further input available, since the state of the parser will be in its call stack. So you can't just stop and exit the parse function in the middle of a stream, and then continue with a newly invoked method when more data is available.
>
> The parser would just dispatch its events on the main thread where the delegate can handle them. So, from the view point of the delegate, it looks like an asynchronous interface.
>
_______________________________________________

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: Asynchronous downloading and parsing of XML
      • From: Thomas Davie <email@hidden>
References: 
 >Asynchronous downloading and parsing of XML (From: Thomas Davie <email@hidden>)
 >Re: Asynchronous downloading and parsing of XML (From: Thomas Davie <email@hidden>)
 >Re: Asynchronous downloading and parsing of XML (From: Mikkel Islay <email@hidden>)
 >Re: Asynchronous downloading and parsing of XML (From: Andreas Grosam <email@hidden>)

  • Prev by Date: NSCoding to/from JSON?
  • Next by Date: Re: Asynchronous downloading and parsing of XML
  • Previous by thread: Re: Asynchronous downloading and parsing of XML
  • Next by thread: Re: Asynchronous downloading and parsing of XML
  • Index(es):
    • Date
    • Thread