public static void ExportToXml(IEnumerable <MAObjectHologram> maObjects, XmlWriter writer, ObjectModificationType modificationType) { foreach (MAObjectHologram maObject in maObjects) { ImportExportEngine.ExportToXml(maObject, writer, modificationType); } }
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(); }