Skip to content

Namespaces stripped from elements but not attributes #34

Description

@GoogleCodeExporter
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

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions