In UIWebView, how can I find a number (there’s no other numbers or text on the page, just one number in the centre) and then use that as an NSString to make a UILabel show that number?
EDIT: The code of the webpage (around the number):
<div style="width: auto; padding:0px; height: auto;" class="ajax_qe" id="ajax_qe_200139_1"><iframe id='qe_logFrm_200139'
instance='1' class='frog3_enabled' style='display:none;'></iframe><div id="np_200139-1" class="brick s_php_eval" type="PHP"
dfid=""></div><div id="np_200139-2" class="brick s_addspace" type="Blank Space" dfid=""><div style="overflow: hidden; font-size:
0px; width: 100%; height: 5px; "></div></div><div id="np_200139-3" class="brick s_text" type="Text and Pictures" dfid=""><table
border=0 cellspacing=0 cellpadding=0 width='100%' class='alt_200139'><tr><td><P align=center><STRONG><FONT color=#5dd228
size=4>8</FONT></STRONG></P></td></tr></table></div><div class="page_marker" id="edit_link_200139_1" style="display: block;
width:; height:;"><a class="edit_link rootpage" style="display: block;" href="#" onclick="qe_login(200139, 0); return false;"
title="Edit this Page"><img src="/sysimages/editfullpage.gif" style="border: none;" /></a></div><div style="clear: both"></div>
</div><div id="r3603" style="position: relative;text-align: center;width: 100%;"><div style="z-index: 11;position:
static;display: inline;">Powered by <a class=ROLLOVER href="http://www.frogteacher.com/" target=_blank><B>Frog</B></A></div>
Thanks.
If the HTML that you are parsing always stays the same (except your number, obviously) you could use something like this:
You can than parse the
yourNumberhowever you like.If, on the other hand, the HTML will differ significantly, I would use the MWFeedParser to parse, but this is a rather heavyweight solution.