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

lasher316

macrumors newbie
Original poster
Dec 8, 2008
1
0
How do I get the HTML source of a webpage using uiWebView? Is this
even possible? Sometimes I may want to show only some of the
content of certain webpages so as not too cluttered. So I would just
parse the HTML and get the info needed.

Do I use uiwebview or is their another method I can use>

Thanks.
 

SqueegyX

macrumors regular
Mar 24, 2008
108
1
I'm not sure if this is best way, but its one way. Let your app be a proxy. When you need to fetch a URL, manually download the HTML with an http request. Then process the result, and feed raw HTML in a uiwebview.

That should give the flexibility you need to achieve this.
 

ghayenga

macrumors regular
Jun 18, 2008
190
0
I'm not sure if this is best way, but its one way. Let your app be a proxy. When you need to fetch a URL, manually download the HTML with an http request. Then process the result, and feed raw HTML in a uiwebview.

That should give the flexibility you need to achieve this.

Your other option would be to put a javascript function that returns the text of the page and call it from your code using the stringByEvaluatingJavascript method of the UIWebView.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.