I am using this code to retreive the text in the main article on this page.
public class HtmlparserExampleActivity extends Activity {
String outputtext;
Ta
Here's a simplified extract of relevance from your question:
Document doc = Jsoup.connect("http://movies.ign.com/articles/100/1002569p1.html").get();
Elements elementsHtml = doc.getElementsByTag("main-article-content");
// ...
You're making a fundamental mistake here. There are no HTML tags like <main-article-content>
in the document. However, there's a <div id="main-article-content">
. According the CSS selector overview about halfway this Jsoup cookbook, you should be using #id
selector.
Document doc = Jsoup.connect("http://movies.ign.com/articles/100/1002569p1.html").get();
Element mainArticleContent = doc.select("#main-article-content").first();
// ...