Posts Tagged ‘xml’

TSMExportToXML: create xml compatible with ADO.NET

Thursday, March 14th, 2013

Today I added the new feature in SMExport – to create the xml file from dataset which is compatible with ADO.NET.

Small sample code:

    smeXML := TSMExportToXML.Create(nil);
    try
      smeXML.DataSet := ClientDataSet;
      smeXML.ColumnSource := csDataset;
      smeXML.FileName := ADOXMLFileName;
 
      smeXML.AddTitle := True;
      smeXML.Format := xmlADO;
      smeXML.XMLTags.RowTag := 'z:row';
      smeXML.DataFormats.CustomDateTimeFormat := 'yyyy-mm-ddThh:nn:ss';
 
      smeXML.Execute;
    finally
      smeXML.Free;
    end;