xmltodict
xmltodict copied to clipboard
Wildcard to process all namespaces to None or ''
I'd like to all namepaces, present or not, to be blanked.
e.g.
xmlns:ns1
xmlns:ns2
<ns1:bar> -> bar
<ns2:foo> -> foo
<foo> -> foo
But I don't know all the xml namespaces that might crop up in these docs, so I just want them all to be blanked.
namespaces = { ... "*" : None, # skip all namespaces ... }
Alternatively, it'd be great to just have all the namespace stuff stripped out. Set process_namespaces=False
, and then add a flag to strip_namespace=True
so that...
<ns1:bar> -> bar
<ns2:foo> -> foo
https://github.com/martinblech/xmltodict/pull/224