Solved

How do I create Delphi classes from an XML schema

Posted on 2006-07-19
7
334 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
Comment Utility
>Delphi Classes
what for delphi classes?

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

meikl ;-)
0
 
LVL 17

Expert Comment

by:Wim ten Brink
Comment Utility
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
Comment Utility
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 17

Expert Comment

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

Expert Comment

by:cwwkie
Comment Utility
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
Comment Utility
PAQed with points refunded (500)

Computer101
EE Admin
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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 gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

744 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now