Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand support for java.io.Reader #1177

Open
benmccann opened this issue Feb 3, 2019 · 3 comments
Open

Expand support for java.io.Reader #1177

benmccann opened this issue Feb 3, 2019 · 3 comments

Comments

@benmccann
Copy link

I see that in #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 a Reader? I'm trying to use Jsoup inside an interface that only has a Reader available

@HansBrende
Copy link

Just use Parser.htmlParser().parseInput(reader, baseUri).

@HansBrende
Copy link

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.

@benmccann
Copy link
Author

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 #1178, which adds it to the Jsoup class, which seemed to be the intended entry point for all calls from the docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants