Any other parser instead of Jsoup?
Which small, light parser is it better to use if Jsoup.parse in my case just crashes because of the file size
my code is not important in here, but here:
Document doc = Jsoup.parse(html);
Element table = doc.getElementsByTag("table");
return table;
OK, this actually works, but there is a difference either if I run this code on the PC(dalvik virtual machine) or on the android device(developing for android OS). I am not sure what exactly is the problem, but it seems that the memory(heap size) is bigger on the device, but I have not checked it so far - it is just an assumption. So what I can say about Jsoup - it is i guess the fastest and smallest library which is suitable for my case to parse and clean pure HTML code on the DOM basis. If you one needs to extarc some part of the HTML based on the tags(tr, table, ... etc) then Jsoup is the best possible open source HTML parser. And when applying it in the code, there are only two lines that are needed, as it is shown in the example above. The result you get after getting elemnets or extracting some part of the HTML is a simple String which contains the tags that you selected with the Jsoup. I am sure it h开发者_开发百科as more functionality than that, just never have used anything more complex.
im guessing that your trying to parse html try Jericho
精彩评论