Re: real verses Virtual memory
Re: real verses Virtual memory
- Subject: Re: real verses Virtual memory
- From: Jens Alfke <email@hidden>
- Date: Sat, 10 Oct 2009 14:45:49 -0700
On Oct 10, 2009, at 1:01 PM, jon wrote:
drives me crazy the documentation... it is there, but you have
to know what to look for before you ever go down the correct tangent.
There's certainly a lot of stuff, and it takes a while to learn what's
in there. :/ The good part is that all these things make your job a
lot easier.
Take a look at the "Tree-Based XML Programming Guide For Cocoa".
(Pretty much wherever they say "XML" there, it includes regular HTML.)
To fetch and parse the page, you just use
[[NSXMLDocument alloc] initWithContentsOfURL: ... options: ... error:
&error];
There's an option flag to "tidy" the syntax before parsing; definitely
include that flag, because most real-world HTML needs tidying to be
parseable as XML.
Then see the subsection "Querying An XML Document" and read the stuff
about XPath. (You can also work with the tree of DOM nodes directly,
pretty much like in WebView, just with different class names; but once
you learn it, XPath is a lot more powerful.)
—Jens_______________________________________________
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