Hi
JiyaDesai,
First with
ResXResourceWriter Class to write resources in an XML resource (.resx) file.
After you done this, you can use XDocument.Load () method to load the document.
Find the node “data”, then add custom node.
I have write a small demo as below
ResXResourceWriter w = new ResXResourceWriter(@"D:\ResXForm.resx");
string i = "1.2";
w.AddResource("happyDude", i);
w.AddResource("welcomeString", "Hello new resource format!");
w.Generate();
w.Close();
XDocument a = XDocument.Load(@"D:\ResXForm.resx");
foreach (XElement element in a.Descendants("data"))
{
XElement xAttr = new XElement("comment", "beta");
element.Add(xAttr);
}
a.Save(@"D:\ResXForm.resx");
Have a nice day!
Kristin