yep thats pretty much the best way to do it. the reason you need to create and instance of folder (CreateFolder) for each item is that AppendChild is appending a reference to the folder, rather than copying it. the way you could speed/simply life is to create a template node and use CloneNode: XmlElement templateFolder = doc.CreateElement("folder"); XmlElement folder; // Add first node folder = templateFolder.CloneNode(); folder.SetAttribute("name", "folder 1"); folder.InnerText = "1st Node"; root.AppendChild(folder); // Add second node folder = templateFolder.CloneNode(); folder.SetAttribute("name", "folder 2"); folder.InnerText = "2nd Node"; root.AppendChild(folder); hope this helps
"When the only tool you have is a hammer, a sore thumb you will have."