Exemplo n.º 1
0
        /// <summary>
        /// http://www.jonasjohn.de/snippets/csharp/xmlserializer-example.htm
        /// </summary>
        /// <param name="data"></param>
        /// <param name="outFileName"></param>
        public static void Export(IExportableToXml data, string outFileName)
        {
            XmlSerializer xmlSerializer = new XmlSerializer(data.GetType());
            TextWriter    tw            = new StreamWriter(@"out.xml");

            xmlSerializer.Serialize(tw, data);
            tw.Close();
        }
Exemplo n.º 2
0
 public void ExportToXml(IExportableToXml data, string outFilePath)
 {
     XMLExporter.Export(data, outFilePath);
 }