After reading through the documentation.
Ive come to realize the selector method is what i need to be able to scan different html sources(such as webpages) to retreive certain tags.
For example. I have a list of htmls that have articles.
when a item is clicked in the listview, the html is parsed fo开发者_运维问答r certain tags to extract the article text.
I know the Selector method would allow me to set a pattern.
But what is the right format for what i am trying to do for the selector method?
But what is the right format for what i am trying to do for the selector method?
It should be in CSS selector syntax. Jsoup also supports some additional pseudoselectors. You can find them all in this cookbook documentation and in the Selector
API documentation.
If you're having problems with figuring the right selector for your functional requirement, then just press Ask Question
button here and elaborare in detail what HTML you have and point out what part exactly you want to extract. This way we can post an answer showing the desired selector syntax.
精彩评论