Hi,
I have an xml file with this contents.
XDocumentnewXML = XDocument.Load(newStringReader(xmlDetail));
<Info>
<Details>
<ID>Ryan</ID>
</Details>
<Details>
<ID>Danny</ID>
</Details>
< /Info>
stringaddRootElements = @"<?xml version=""1.0"" encoding=""utf-8""?>";
Now how can I add the above string to the beginning of the xml.
So my XML should like below.
<?xml version=""1.0"" encoding=""utf-8""?>
< Info>
<Details>
<ID>Ryan</ID>
</Details>
<Details>
<ID>Danny</ID>
</Details>
< /Info>