C#: How to remove namespace information from XML elements(C#:如何从 XML 元素中删除命名空间信息)
问题描述
如何从 C# 中的每个 XML 元素中删除xmlns:..."命名空间信息?
How can I remove the "xmlns:..." namespace information from each XML element in C#?
推荐答案
尽管 Zombiesheep 给出了警告性的回答,我的解决方案是使用 xslt 转换来清洗 xml 以执行此操作.
Zombiesheep's cautionary answer notwithstanding, my solution is to wash the xml with an xslt transform to do this.
wash.xsl:
这篇关于C#:如何从 XML 元素中删除命名空间信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!