• 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
Extract ID Value Into UILabel.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Extract ID Value Into UILabel.
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Re: coredata: what's the correct delete rule for ...
  • Next by Date: Re: NSOutlineView parentobject
  • Previous by thread: Re: coredata: what's the correct delete rule for ...
  • Next by thread: Re: Extract ID Value Into UILabel.
  • Index(es):
    • Date
    • Thread