C#: How to remove namespace information from XML elements

前端 未结 3 700
面向向阳花
面向向阳花 2020-12-16 02:18

How can I remove the \"xmlns:...\" namespace information from each XML element in C#?

3条回答
  •  甜味超标
    2020-12-16 03:12

    Zombiesheep's cautionary answer notwithstanding, my solution is to wash the xml with an xslt transform to do this.

    wash.xsl:

    
      
    
      
        
          
        
      
    
      
        
          
        
      
    
      
        
          
        
      
    
    
    

提交回复
热议问题