简体   繁体   English

TADO记录集XML到TClientDataSet XML格式

[英]TADO recordset XML to TClientDataSet XML format

I'm saving TADO recordset to XML and trying to load it to TClientDataSet but geting error about wrong XML format. 我正在将TADO记录集保存到XML并尝试将其加载到TClientDataSet,但是关于错误的XML格式存在错误。

How can i transform ADO XML recordset format to TClientDataset format. 如何将ADO XML记录集格式转换为TClientDataset格式。

thanks. 谢谢。

The XML format used by the TClientDataSet is not the same used by ADO, in order to transform the XML ADO format in a valid XML file used by TClientDataset you have two options. TClientDataSet使用的XML格式与ADO使用的格式不同,为了在TClientDataset使用的有效XML文件中转换XML ADO格式,您有两个选项。

1) Use a XSLT Transformation, for this you need the a XSL Style Sheet and/or a XSD schema from XML , here you find some hints about the XSD. 1)使用XSLT转换,为此你需要一个XSL样式表和/或XML的XSD架构, 在这里你可以找到一些关于XSD的提示。

2) Use one of the ado components to read the XML ADO file, then iterate over the records and finally populate the TClientDataSet. 2)使用其中一个ado组件读取XML ADO文件,然后迭代记录,最后填充TClientDataSet。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM