Skip to content

[AJmycukR] Fix for apoc.import.graphml #310

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

Merged
merged 1 commit into from
Feb 3, 2023
Merged

[AJmycukR] Fix for apoc.import.graphml #310

merged 1 commit into from
Feb 3, 2023

Conversation

Lojjs
Copy link
Contributor

@Lojjs Lojjs commented Jan 30, 2023

No description provided.

Comment on lines +203 to +204
inputFactory.setProperty(XMLInputFactory.SUPPORT_DTD, false);
inputFactory.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, false);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Another possible approach could be to try to reuse the same XML parser that we use for the apoc.xml procedures, not sure how feasible that would be

Copy link
Contributor

Choose a reason for hiding this comment

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

I think that different XML parsers in Java have different behaviour and work well for different things. The XMLInputFactory is however used in another place IIRC.

We could have our own XMLParserFactory which returns an XMLEventReader with sensible defaults. I leave it up to you whether you'd like to explore that. However, neither do I see this procedure staying in APOC Core in the long term, nor do I anticipate many code changes in this procedure between now and 2025 when 4.4 goes out of support.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok I will not put effort into further changes then

Copy link
Contributor

@AzuObs AzuObs left a comment

Choose a reason for hiding this comment

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

Nice job 🙂

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

Successfully merging this pull request may close these issues.

2 participants