android html download and parse error
- by Brahadeesh
I am trying to download the html file using the ul of the page. I am using Jsoup.
This is my code:
TextView ptext = (TextView) findViewById(R.id.pagetext);
    Document doc = null;
    try {
         doc = (Document) Jsoup.connect(mNewLinkUrl).get();
    } catch (IOException e) {
        Log.d(TAG, e.toString());
        e.printStackTrace();
    }
    NodeList nl = doc.getElementsByTagName("meta");
    Element meta = (Element) nl.item(0); 
    String title = meta.attr("title"); 
    ptext.append("\n" + mNewLinkUrl);
When running it, I am getting an error saying attr is not defined for the type element.
What have I done wrong? Pardon me if this seems trivial.