Quantcast
Channel: Microsoft Techies
Viewing all articles
Browse latest Browse all 430

xml remove root node c#

$
0
0

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>

Viewing all articles
Browse latest Browse all 430

Trending Articles