Leonardo Herrera
Leonardo Herrera

Reputation: 8406

Delphi XML Data Bindings error: "Unknown datatype"

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.

This is the file I'm trying to import. There are some other required files here.

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

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

Upvotes: 3

Views: 1566

Answers (2)

user1353491
user1353491

Reputation: 1

Had a similar problem with the XML Data Bindings in delphi 7 If you use delphi 2010 there has been no such problem.

Upvotes: 0

Leonardo Herrera
Leonardo Herrera

Reputation: 8406

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.

Cheers!

Upvotes: 2

Related Questions