Skip to content

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
wants to merge 1 commit into from
Closed

Conversation

lrytz
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
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
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 this pull request may close these issues.

Use FactoryAdapter as ContentHandler crashes
2 participants