S sergiones Member Licensed User Longtime User Nov 2, 2016 #1 Hi guys, I need to read all the body elements from a webview like <p> and <span>. How can I do it? Thank you
Hi guys, I need to read all the body elements from a webview like <p> and <span>. How can I do it? Thank you
S sergiones Member Licensed User Longtime User Nov 2, 2016 #2 I solved the problem using: Dim no As NativeObject = WebView1 Dim myString As String = no.RunMethod("stringByEvaluatingJavaScriptFromString:", Array("document.body.innerText")).AsString In this case I got the innerText because I actually need the strings. If you need the html tags you can use document.body.innerHtml Thank you. Upvote 0
I solved the problem using: Dim no As NativeObject = WebView1 Dim myString As String = no.RunMethod("stringByEvaluatingJavaScriptFromString:", Array("document.body.innerText")).AsString In this case I got the innerText because I actually need the strings. If you need the html tags you can use document.body.innerHtml Thank you.