save xml document
Published: 14. January 2009 | Updated: 26. October 2011License: Microsoft Public License (MS-PL)
Categories: Framework » XML
Tags: C# XML
Import namespaces
using System.IO; using System.Xml;
Code
// create instance of new xml document XmlDocument doc = new XmlDocument(); // fill xml document // save to file by path doc.Save(@"C:\sitemap.xml"); // save to file stream doc.Save(File.Create(@"C:\sitemap.xml"));
| Send us feedback about this snippet » |





