Saturday 2 May 2015

xml remove root node c#


TextReader txtIn = new StringReader("<Root><A>Content</A></Root>");
XDocument xIn = XDocument.Load(txtIn);
XElement xOut = xIn.Root.Elements().First();

 xOut.ToString();
Outpt: <A>Content</A>