private void Write() { string folder = MagickScriptTypes.GetFolderName(_Depth); string outputFile = PathHelper.GetFullPath(@"src\Magick.NET\Resources\" + folder + @"\MagickScript.xsd"); Console.WriteLine("Creating: " + outputFile); XmlWriterSettings settings = new XmlWriterSettings(); settings.Indent = true; settings.IndentChars = " "; using (XmlWriter writer = XmlWriter.Create(outputFile, settings)) { _Document.Save(writer); } }