Delphi XML数据绑定错误:“未知数据类型” [英] Delphi XML Data Bindings error: "Unknown datatype"

查看:48
本文介绍了Delphi XML数据绑定错误:“未知数据类型”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从导入的架构中导入包含一些复杂文件的XSD文件。 XML数据绑定向导给我一个未知数据类型错误。我在几个论坛中都看到了这个问题,但是看不到解决方案。

I'm trying to import an XSD file with some complex files from an imported schema. The XML Data Bindings Wizard gives me an "Unknown datatype" error. I see this problem mentioned in several forums but no solution in sight.

这是我要导入的文件。在此处

是否有任何变通办法或替代工具来为Delphi XE生成XML类?

Is there any workaround or an alternate tool to generate XML classes for Delphi XE?

编辑: 这个问题可能至少部分重复。

This question may be a duplicate of this, at least partially. Didn't found it the first time.

推荐答案

好,XSD文件包含以下内容:

Well, the XSD file contained the following:

    <xs:include schemaLocation="SiiTypes_v10.xsd"/>

此文件包含多个数据类型定义,它们与当前文件位于同一命名空间中。我不确定是这是原因还是向导是否不能包含外部文件,但我只是继续将所有类型定义放在文件中就可以了。

This file contained several data type definitions that were in the same namespace than the current file. I'm not sure if this was the cause or simply that the wizard cannot include external files, but I just went ahead and put all the type definitions inside the file and it did the trick.

我已将该文件放入源代码控制系统中,我祈祷这不会在不久的将来使我感到痛苦。

I have put the file in my source control system and I pray that this doesn't bite me in the tuckus in the near future.

我'除非有人知道更好的方法来完成这项工作,否则我会在几天之内接受我的回答。

I'll accept my own answer in a couple of days unless somebody knows a better way to make this work.

干杯!

这篇关于Delphi XML数据绑定错误:“未知数据类型”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆