use XmlTextWriter. You can then set the Indentation property to the number of spaces you want to indent. http://msdn.microsoft.com/en-us/library/system.xml.xmltextwriter.indentation.aspx
To use the Indent property, you can't have mixed content http://msdn.microsoft.com/en-us/library/system.xml.xmlwritersettings.indent.aspx
"The elements are indented as long as the element does not contain mixed content. Once the WriteString or WriteWhitespace method is called to write out a mixed element content, the XmlWriter stops indenting. The indenting resumes once the mixed content element is closed."