Re: NSString Parsing
Re: NSString Parsing
- Subject: Re: NSString Parsing
- From: Peer Allan <email@hidden>
- Date: Mon, 28 Oct 2002 10:56:25 -0600
I looked at it, but it seemed I would be in the same boat, in that I would
have to truncate (or with the Scanner I could skip) the string and start
again.
It just seems like a very inefficient way to do it, but it that is the best
way, then that's how I will do it.
Peer
On 10/28/02 10:53 AM, "Jonathan E. Jackel" <email@hidden> wrote:
>
Have you looked at NSScanner?
>
>
Jonathan
>
>
> -----Original Message-----
>
> From: email@hidden
>
> [mailto:email@hidden]On Behalf Of Peer Allan
>
> Sent: Monday, October 28, 2002 11:01 AM
>
> To: email@hidden
>
> Subject: NSString Parsing
>
>
>
>
>
> Hi,
>
>
>
> I'm trying to write a basic program that grabs a page from a website then
>
> "scrapes" through the HTML to get the data I want. Currently, I am using
>
> initWithContentsOfURL: to get the page into a NSString. So I am
>
> getting the
>
> full page no problem.
>
>
>
> What I want to do is extract all the text from in between a pair or tags
>
> (<td>...</td> for example). I know I could use a rangeOfString:
>
> call to get
>
> the first one, but then I have to create a new string with the remaining
>
> data and call rangeOfString: again to get the next and on and on until the
>
> whole string is parsed. I hope there is a better way to do this.
>
>
>
> Thanks
>
>
>
> Peer
>
> _______________________________________________
>
> cocoa-dev mailing list | email@hidden
>
> Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
>
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.