コード例 #1
0
 public static void ExportToXml(IEnumerable <MAObjectHologram> maObjects, XmlWriter writer, ObjectModificationType modificationType)
 {
     foreach (MAObjectHologram maObject in maObjects)
     {
         ImportExportEngine.ExportToXml(maObject, writer, modificationType);
     }
 }
コード例 #2
0
        public static void ExportToXml(IEnumerable <MAObjectHologram> maObjects, string fileName, ObjectModificationType modificationType)
        {
            XmlWriterSettings settings = new XmlWriterSettings();

            settings.Indent       = true;
            settings.IndentChars  = "  ";
            settings.NewLineChars = Environment.NewLine;
            XmlWriter writer = XmlWriter.Create(fileName, settings);

            writer.WriteStartDocument();
            writer.WriteStartElement("acma-export");

            ImportExportEngine.ExportToXml(maObjects, writer, modificationType);

            writer.WriteEndElement();
            writer.WriteEndDocument();
            writer.Flush();
            writer.Close();
        }