lets explain whats happening, i am parsing a html page to show its content in my android application. firstly i load the html with android webview
and then i get html code by code below :
// load a webview
wb.postUrl(url, EncodingUtils.getBytes(postData, "BASE64"));
// on page finish i will call a @JavascriptInterface
public void onPageFinished(WebView view, String url) {
view.loadUrl("javascript:window.HTMLOUT.processMain(
document.getElementsByTagName('html')[0].innerHTML);");
}
@JavascriptInterface
class LoadListener{
@JavascriptInterface
public void processMain(String html)
{
doc= Jsoup.parse(html);
getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
//here i can parse doc that is a jsoup document and select elements
doc.select("#login > tbody > tr > td.error").text();
});
my problem : there is a table
in my html page that is dynamically added to html( i am not sure how, append ? addchild ? php ? or... because i have not access to php codes ). i select that table with this line of code! but it returns null.
doc.select("#login > tbody > tr > td.error").text()
so how can i select that table ??