-2

i have a web view that loads data from database into divs, each div has specific id from database, and each div is a link whose url depend upon the id fetched from the database. How can i get the id of loaded divs from the database to the Android activity?

1 Answers1

1

Sounds like you will need to parse the HTML. In the past I've used jsoup to do this. It's extremely fast and has DOM, CSS, and jquery-like methods to find the data you need.

Unfortunately getting the HTML from the WebView isn't straight forward (see: How do I get the web page contents from a WebView?) so you might be better off using a HttpRequest to load the content for parsing and then the loadData method on the WebView to display the content.

Cory Charlton
  • 8,868
  • 4
  • 48
  • 68