Solved

How do I create Delphi classes from an XML schema

Posted on 2006-07-19
7
350 Views
Last Modified: 2010-05-18
I'm running Delphi 2005 Professional, and I need to create Delphi Classes from an XML schema.

I see references in the documentation to a XML Data Binding Wizard, which I can only assume is not available in the version of Delphi I am using.

Browsing the web gives lots of links to "xml2delphi" which seems to be what I need, but all the links now are dead.

Is there any thing that does now exist?

Guess what - this is quite urgent!

Ta
0
Comment
Question by:Hoffie01
7 Comments
 
LVL 27

Expert Comment

by:kretzschmar
ID: 17137325
>Delphi Classes
what for delphi classes?

(just wondering -> from a schema (primary for validation))

meikl ;-)
0
 
LVL 17

Expert Comment

by:Wim ten Brink
ID: 17137552
The XML Data Binding Wizard is available in Delphi 2005 Pro and in the past I've used it quite often. Don't have it available right now, unfortunately, but it is there.

Unfortunately, the XML Data Binding Wizard has some flaws since it fails to convert some datatypes correctly. Notably the booleans and date/time types are not compliant to the XML standard.

Btw, I googled and found http://www.aptrio.com/Development/Specialized-Tools/xml-delphi-gold-support-9349.html which seems to be very alive... But after a bit more searching I ended at:
http://www.it4mation.nl/products/discontinued_xml2delphi/

It has been discontinued. :-( And the source has not become open-source yet. Maybe it will never even become open-source.

In an O'Reilly book I once read that it would technically be possible to use XSLT to convert an XML schema to objects in whatever programming languages you like. In the past I have tried to start making such an XSLT file but it's just too much work.

Any other solutions? As far as I know, none. I know that the creators of XMLSpy have once considered to support Delphi with their product but apparantly that plan didn't get enough support. So the best solution is still the XML Data Binding Wizard that is part of Delphi, just as long as you're aware of it's flaws...

The flaws: booleans are written as firstcaps, thus True and False instead of true and false. Dates and times are written in whatever format Delphi likes at that moment and not according to the XML specifications, thus resulting in many nasty flaws.
0
 

Author Comment

by:Hoffie01
ID: 17137654
I don't have the XML Data Binding Wizard visible :-(.  Is it because I only have the win32 personality installed.  I hope not as I have very painful experiences of trying to add in the .net, resulting in having to start again from scratch
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 17

Expert Comment

by:Wim ten Brink
ID: 18266239
PAQ with points refunded, please. The two links might still be useful for someone. :-)
0
 
LVL 14

Expert Comment

by:cwwkie
ID: 18269824
Don't know if you want to keep a link to a discontinued product. But I leave that up to the moderator to decide.
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 18297734
PAQed with points refunded (500)

Computer101
EE Admin
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question