I am interested in reading ONLY the contents of TEXT in a UIWebView. How can I do it? I found a lot of help on the web about reading HTML content, but I want ONLY text. Any suggestions?
thanks
Get the .textContent or .innerText root node instead of .innerHTML .
.textContent
.innerText
.innerHTML
[web stringByEvaluatingJavaScriptFromString:@"document.documentElement.innerText;"];
(BTW, there is also a private property of webView.text .)
webView.text
Source: https://habr.com/ru/post/1306857/More articles:Learning Design Pattern Factory - designListBoxItem.Parent returns nothing, cannot receive it through VisualTreeHelper.GetParent either - wpfWindows Embedded Remote Debugging - debuggingAvoid unnecessary events and an endless loop in "connected" JSliders? - javahow to parse jquery ajax xhtml answer? - jqueryCopy files where lastwritetime -ge 3/26/2010 21:00 with Powershell - powershell-v2.0Is there a standard .NET throw exception when a class does not implement the required attribute? - genericsSilverlight DataGrid column sorting does not update programmatically changed cells - c #How to get metadata from a file in C #? - c #loaded the "PersonnalDetails" tip but didn't get a UITableView - iphoneAll Articles