Mega Code Archive

 
Categories / VB.Net / XML LINQ
 

XElement RemoveAttributes removes the attributes of this XElement

Imports System Imports System.Xml Imports System.Xml.XPath Public Class MainClass     Public Shared Sub Main()         Dim root As XElement = _              <Root Attr1="1" Attr2="2" Attr3="3">                 <Child1>1</Child1>                 <Child2>2</Child2>                 <Child3>3</Child3>              </Root>                  root.RemoveAttributes()         Console.WriteLine(root)     End Sub End Class