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

Capture XML namepace prefix and URL within the deserialized data #89

Merged
merged 9 commits into from
Aug 15, 2021

Conversation

Blacksmoke16
Copy link
Owner

Fixes #85

Handle nodes with multiple namespaces

Handle unprefixed namespaces
Take element prefixes into consideration processing child nodes


Monkey patch in `#namespace_definitions`

Can be replaced upstream after crystal-lang/crystal#11037 is resolved/released
Add optional ability to parse XML namespaces

This better supports XML structures with namespaces/prefixed elements but is opt in as it changes the structure of the JSON.  This will become the default in oq 2.x
Removes reliance on parsing a `NamedTuple` directly
Removes need to have `**args` on every conversion method
@Blacksmoke16 Blacksmoke16 added format:xml kind:bug An existing feature isn't doing something correctly kind:enhancement kind:feature Request for new functionality and removed kind:enhancement labels Aug 1, 2021
@Blacksmoke16
Copy link
Owner Author

@LoganBarnett I added specs and error if someone uses the namespace option w/o --xmlns. Find anything else or think this is good to go?

@LoganBarnett
Copy link
Contributor

@Blacksmoke16 whoops, I commented back on the issue. Gist: Looks good! Let's merge it :)

@Blacksmoke16 Blacksmoke16 marked this pull request as ready for review August 15, 2021 17:17
@Blacksmoke16 Blacksmoke16 merged commit 4ec46da into master Aug 15, 2021
@Blacksmoke16 Blacksmoke16 deleted the xml-namespaces branch August 15, 2021 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
format:xml kind:bug An existing feature isn't doing something correctly kind:feature Request for new functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

XML namespaces stripped when referenced
2 participants