SyntaxFix
Write A Post
Hire A Developer
Questions
You could use XDocument:
new XDocument( new XElement("root", new XElement("someNode", "someValue") ) ) .Save("foo.xml");
If the file you want to create is very big and cannot fit into memory you might use XmlWriter.