Open benmccann opened 5 years ago
Just use Parser.htmlParser().parseInput(reader, baseUri)
.
You're right though that the functionality to parse a document fragment from a reader is missing. That's an open issue I raised some time ago here: #1143.
Thanks. It might be helpful to document Parser
if that's the intended method. None of the examples refer to it, so it took me awhile to discover
I've sent https://github.com/jhy/jsoup/pull/1178, which adds it to the Jsoup
class, which seemed to be the intended entry point for all calls from the docs
I see that in https://github.com/jhy/jsoup/issues/463 some support for
Reader
was added: https://jsoup.org/apidocs/org/jsoup/parser/Parser.html#parseInput-java.io.Reader-java.lang.String-However, I'm not quite sure how to use it. It looks like none of the
Jsoup.parse
methods take a reader. Would it be possible to add a new method taking aReader
? I'm trying to use Jsoup inside an interface that only has aReader
available