I got the string from xml file.now i want to Add the new node in that.How can i do?The code is like this.
byte[] binary = Convert.FromBase64String(webResource.Attributes["content"].ToString());
string resourceContent = UnicodeEncoding.UTF8.GetString(binary);
XDocument xDoc = XDocument.Parse(resourceContent);
Here in resourceContent i got the string from xml file now how can i add new node in that ..The Xml file is like this..
<root name="account">
<node cId="7143cd70-cd0e-e211-b10a-984be173a3b0" cName="Variety Store (sample)" pId="00000000-0000-0000-0000-000000000000" pName="" />
</root>
More clarification=i got the whole XML in String right?now i want just add one node and save back to XML file…but Be remember that i can just save the content of xml file..i dont have rights to paste the whole xml into specify path
1 Answer