I
I
Ilnar2014-07-14 14:29:49
Android
Ilnar, 2014-07-14 14:29:49

How to parse html in android?

Who can give really working and, moreover, more or less understandable examples of parsing the HTML code of a page ..
Maybe there are normal examples of using htmlcleaner ?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Igor, 2014-07-14
@ilnar_93

Pattern pattern = Pattern.compile("(\\d+);([\\w\\./:]+)<BR>");
Matcher matcher = pattern.matcher(html);
boolean b = false;
while (matcher.find()) {
 Log.d(TAG, matcher.group(1) + " " + matcher.group(2));
 b = true;
}

M
Mintormo, 2014-07-14
@Mintormo

Yes, there are enough examples on the official site . There is also JSoup . I liked him more.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question