Extracting HTML Data from A Blogspot blog from a Android phone
I have looked around and I can't find anything that will help. Here is what I want to do:
- Extract The First Post From a
- Blogspot Blog Display it on the screen
I need something that will pull data from a specific tag and id in a html page. I also need it to be compatible with the Dalvik format because with some libraries it says conversion failed and my application doesn't work. It would be开发者_C百科 nice if it was straight forward too.
Any suggestions?
Use HttpClient to retrieve the page. Use any of the preponderance of Java HTML parsers to extract your post. If you find a library that you like, and you get a "conversion failed" error, grab the source code instead of the JAR and add the source to your project -- you will get concrete compilation errors, and then you can determine if they can be repaired.
I highly recommend trying out if you need just text
http://www.alchemyapi.com/api/text/
You can use their Android SDK. It works awesome! I use it too for text extraction.
use Jsoup you can parse a html data by file, string and url. it also extracts data with tags and class http://jsoup.org/cookbook/
精彩评论