mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Fixed that xmldecl was not part of the export.xml.
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Xml;
|
||||||
using System.Xml.Linq;
|
using System.Xml.Linq;
|
||||||
using Orchard.FileSystems.AppData;
|
using Orchard.FileSystems.AppData;
|
||||||
using Orchard.ImportExport.Models;
|
using Orchard.ImportExport.Models;
|
||||||
@@ -50,8 +52,11 @@ namespace Orchard.ImportExport.Services {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var path = _appDataFolder.Combine(ExportsDirectory, exportFile);
|
var path = _appDataFolder.Combine(ExportsDirectory, exportFile);
|
||||||
var recipeText = recipeDocument.ToString(SaveOptions.None);
|
|
||||||
_appDataFolder.CreateFile(path, recipeText);
|
using (var writer = new XmlTextWriter(_appDataFolder.CreateFile(path), Encoding.UTF8)) {
|
||||||
|
writer.Formatting = Formatting.Indented;
|
||||||
|
recipeDocument.WriteTo(writer);
|
||||||
|
}
|
||||||
|
|
||||||
return _appDataFolder.MapPath(path);
|
return _appDataFolder.MapPath(path);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user