question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Strip namespaces from attributes?

See original GitHub issue

I have likely not RTFM properly, but I cannot see how to specify that namespaces get removed from attributes as well. They appear in the output as:

@http:\long\namespace:attribute_name

I have written a small routine to strip them out afterwards.

(Very useful library, tho’!)

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
Hellowlolcommented, Sep 29, 2015

Is xmltodict.parse(‘xmlstring’, process_namespaces=False, attr_prefix=‘’) what you looking for?

0reactions
JccSanabriacommented, Jul 17, 2020

@Hellowlol , your recommendation partially works, but, the attributes still being joined with ns as ns:my_attribute

Read more comments on GitHub >

github_iconTop Results From Across the Web

XML file removing namespaces in attributes - Ask TOM
You can use XMLTRANSFORM to apply an XSLT (Transformer) to remove the namespaces. I'm no XML expert, so here's an example using the...
Read more >
How to remove all namespaces from XML with C#? - Stack ...
LocalName; // replacing all attributes with attributes that are not namespaces and their names are set to only the localname XE.
Read more >
How to remove the namespace and its prefixes in an XML file ...
Answer. The following XSLT should be used to strip all the namespace and prefixes in the XML document. <xsl:stylesheet version="1.0" ...
Read more >
how to remove the xmlns attribute that gets ... - Microsoft Learn
Hi experts ,. i have a scenario, where i have to read the xml document and create/add an xmlnode to the document. newElem...
Read more >
Removing a Namespace Prefix from an Attribute
To remove a namespace prefix from an attribute: 1. In the View List under System Configuration, click XML File Changes.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found