Thursday, 15 August 2013

javascript - Get all html data from UIWebView -



javascript - Get all html data from UIWebView -

i programming in xcode 6 , utilize objective-c.

i want load html code page. there more answers on questions, when seek them load part of page.

i have tried best reply of next question: reading html content uiwebview

when seek part of html string. tried:

nsstring *html = [webview stringbyevaluatingjavascriptfromstring:@"document.documentelement.outerhtml"];

when view html code on pc open firefox , press f12. when much more html code uiwebview.

is there alternative in uiwebview or objective-c html code?

is possible extract mail service addresses html file using javascript , stringbyevaluatingjavascriptfromstring:?

you can fetch html of web page making request url of html , can html in nsstring object using next code . dont need uiwebview access html content of webpage .

nsurlresponse * response = nil; nserror * error = nil; nsurlrequest* urlrequest = [nsurlrequest requestwithurl:[nsurl urlwithstring:@"http://www.emdrassociation.org.uk/site.php/profile/emdr/alison_russell.html"] cachepolicy:nsurlrequestreloadignoringcachedata timeoutinterval:30.0]; nsdata* info = [nsurlconnection sendsynchronousrequest:urlrequest returningresponse:&response error:&error]; nsstring *htmlstring = [nsstring stringwithutf8string:[data bytes]];

javascript html objective-c uiwebview

No comments:

Post a Comment