Extract ID Value Into UILabel.
Extract ID Value Into UILabel.
- Subject: Extract ID Value Into UILabel.
- From: Philip Juel Borges <email@hidden>
- Date: Fri, 5 Feb 2010 08:44:58 +0100
Hi,
I'm looking for a way to create an IBAction that extracts the id value
of a tag name into a UILabel from any given HTML file that is loaded
in my UIWebView. My ids are as listed below:
<vs id="1:1">
<vs id="2:16">
<vs id="14:57">
<vs id="24:14">
This code, HTMLverseLabel.text = [webView
stringByEvaluatingJavaScriptFromString:@"document.title"]; extracts
the title of any HTML file that is loaded in the UIWebView into a
UILabel . So title becomes a general pointer that is only defined once.
The code, document.getElementById('1:1').id, extracts the id value 1:1
wherever that value occurs in my HTML files. But I'd rather not want
to write 100s methods to extract each id value. So I'm thinking that
there must be a way, in Objective-C, that you assign the numbers of
this code, document.getElementById('1:1').id, a general pointer. I've
tried replacing the numbers with %@ or %d but that doesn't work.
Any ideas?
--Philip
_______________________________________________
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