Using Jsoup, I want to extract all paragraphs from an HTML page, i.e. whatever is between <p>
and </p>
.
How do I accomplish th开发者_StackOverflow中文版is?
Can'y you just do:
myDocument.getElementsByTag('p')
JSoup getElementsByTag
You can then iterate over the returned elements and get their data/text/ownText / whatever you think is most relevant for what you want to do.
JSoup Element.text()
精彩评论