We're nearly there. Drop a TClientDataset, a TXMLTransformProvider and a TDatasource on the form. Here's what the form looks like now:
Link the Grid, the Datasource and the ClientDataset, and set the ClientDataset's ProviderName to point to the XML Transform Provider. 7. Set the TransformRead.TransformationFile of the XMLTransformProvider to Ziptrans.XTR.
首先先将dataset存成xml文件,然后利用delphi提供的外部工具 xml mapping tool 将生成的xml文件转换成xtr模版文件。然后根据上述方法设置好各个控件的连接。
xml mapping tool 使用方法:1、导入生成好的xml文件 file-open 2、在document区域中右键选择 select all 3、菜单栏 create--datapacket form xml 4、菜单栏 create-transformation 5、菜单栏 file--save--transformation 保存xtr文件。