Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Allow using FactoryAdapter as ContentHandler #765

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

Closed
lrytz wants to merge 1 commit into scala:main from lrytz:t764
Closed

Conversation

Copy link
Member

@lrytz lrytz commented Jun 6, 2025

Fixes #764

@lrytz lrytz requested a review from dubinsky June 6, 2025 13:36
Copy link
Contributor

@dubinsky dubinsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd love to not expose FactoryAdapter at all; is feeding an appropriate XMLReader to XML.withXMLReader().loadDocument() feasible?

lrytz reacted with thumbs up emoji
Copy link
Member Author

lrytz commented Jun 10, 2025

Thanks for the pointer! In the case of jdom2, I can do

val source = new transform.JDOMSource(document)
XML.withXMLReader(source.getXMLReader).loadDocument(source.getInputSource).docElem

@lrytz lrytz closed this Jun 10, 2025
Copy link
Member Author

lrytz commented Jun 10, 2025

#694 for reference

Copy link
Contributor

Thanks for the pointer! In the case of jdom2, I can do

val source = new transform.JDOMSource(document)
XML.withXMLReader(source.getXMLReader).loadDocument(source.getInputSource).docElem

Glad it worked out!
Any suggestions for making Scala XML documentation clearer in this area are welcome ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@dubinsky dubinsky dubinsky left review comments

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Use FactoryAdapter as ContentHandler crashes
2 participants

AltStyle によって変換されたページ (->オリジナル) /