-
Notifications
You must be signed in to change notification settings - Fork 33
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
XML namespaces getting injected into attribute names - parker covention #35
Comments
So you want to ignore namespaces. What if the same element is used in different namespaces, they would end up being the same. |
Hi In the 5 - 6 different xml files I'm dealing with, what you describe does not occur. Also as this I'm specifically using the Parker covention, I would have thought that name spaces would have been discarded along with the root element. If I'd used the preserve root element, not so much.. Thoughts? |
Hi, <EML xmlns="urn:oasis:names:tc:evs:schema:eml" >
<TransactionId>B313CBA4-BCA9-4B8F-8C50-BADE9423A020</TransactionId>
</EML> may be converted to json {
"EML": {
"-xmlns": "urn:oasis:names:tc:evs:schema:eml",
"TransactionId": "B313CBA4-BCA9-4B8F-8C50-BADE9423A020"
},
"#omit-xml-declaration": "yes"
} |
Thanks @javadev that would be the result I would expect if I'd used the option preserve_root=True option. @sanand0 & @dagwieers happy to do a PR but might need some guidance as I'm relatively new to Python but not new to PRs and XML/JSON |
Strike my last comment xmltodict is effectively parker convention without the annoying (and superfluous) namespace injections. Consider this closed but thanks for the work done on this library and your time to read this. |
Thanks @LaughingBubba The way xmltodict handles namespaces is elegant. I'm re-opening this issue to apply the same for all conventions. Not sure when we'll get this done, but this is definitely useful. |
Hi, after reading issues #1 , #8 and PR #9 I think I have a different issue.
Essentially this:
becomes this:
where as I was actually expecting this:
Am I missing something?
The text was updated successfully, but these errors were encountered: