Public Function cleanXmlns(ByVal str As String) As String
Dim root As XElement = XElement.Parse(str)
root.DescendantsAndSelf.Attributes.Where(Function(x) x.IsNamespaceDeclaration).Remove()
For Each el As XElement In root.DescendantsAndSelf()
el.Name = el.Name.LocalName
Next
Return root.ToString
End Function
No hay comentarios.:
Publicar un comentario