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

Namespaces stripped from elements but not attributes #34

Open
GoogleCodeExporter opened this issue Nov 9, 2015 · 1 comment
Open

Namespaces stripped from elements but not attributes #34

GoogleCodeExporter opened this issue Nov 9, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Parse an XML string containing namespaced elements *and attributes* into 
JSON.
2. Note that while namespaces are stripped from the element names (which become 
keys in the JSON), the namespaces are still present in the attribute key names.

I'm not sure if this is deliberate or not, but it seems like it should be 
consistent. Since namespaces are removed from the element names in the JSON 
output, it seems like they should be removed from the attribute names as well. 
The namespace IS properly populated in the "__prefix" key for attributes, so 
it's there is someone needs it (just as it is for elements).

Also, not sure if this would affect the translation from JSON back to XML. If 
it doesn't already, I'd say it should take the __prefix and prepend it to the 
attribute name, which is how I assume it already works for elements?

Original issue reported on code.google.com by brian...@gmail.com on 23 Jan 2015 at 3:40

@GoogleCodeExporter
Copy link
Author

Original comment by abdulla....@gmail.com on 20 May 2015 at 10:00

  • Changed state: Accepted

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

No branches or pull requests

1 participant