Reputation: 929
Hi friends I am developing an application in Blackbery10 to parse the xml data in an html page. That the html is loaded in a webview and the html source contains some xml tags. Please help me to get the html source code of web view in blackberry10.
Upvotes: 0
Views: 515
Reputation: 21
On the Webview you can use a function evaluateJavaScript (const QString &script, bb::cascades::JavaScriptWorld::Typeworld world) to execute a javascript function to get the text or xml you need. You should be able to evaluate the following expression:
return document.documentElement.innerHTML;
You can then retrieve the evaluated expression from the signal javaScriptResult
Upvotes: 2
Reputation: 1921
You cannot access the HTML of a WebView that was loaded from network
If you want an application highly based on HTML, you can have a look at WebWorks. If you still require the native framework, you have to request the content yourself, parse it, and then inject it into the webview.
Upvotes: 0