Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

samirah

macrumors newbie
Original poster
Jan 31, 2011
3
0
Having a hard time to figure out how to get the value from the below code.

Code:
document.getElementById('today-details-1').value = '41';
document.getElementById('today-details-2').value = '30';

Im having my application making a NSURLConnection and it is receiving the contents of the page which are basically 5 more lines like the ones above.

I want to be able to get the value for each of the elements. How would i accomplish this?

Tried nodesForXPath but cant get that to work as this is not really a xml page.
 
Having a hard time to figure out how to get the value from the below code.

Code:
document.getElementById('today-details-1').value = '41';
document.getElementById('today-details-2').value = '30';

Im having my application making a NSURLConnection and it is receiving the contents of the page which are basically 5 more lines like the ones above.

I want to be able to get the value for each of the elements. How would i accomplish this?

Tried nodesForXPath but cant get that to work as this is not really a xml page.

There MIGHT be a way to do this using a UIWebView:

http://webcache.googleusercontent.c...d=3&hl=en&ct=clnk&gl=us&source=www.google.com

Honestly, if it were me, I would just parse the text using a regular expression and be done with it.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.