Re: XSD to Pascal Objects?
From: Adem (adembaba_at_excite.com)
Date: 04/20/04
- Next message: Jan Mitrovics: "Re: XSD to Pascal Objects?"
- Previous message: Robert: "Re: Looking for database that is easy to install"
- In reply to: Bryce K. Nielsen: "Re: XSD to Pascal Objects?"
- Next in thread: Jan Mitrovics: "Re: XSD to Pascal Objects?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 20 Apr 2004 07:26:35 -0700
Bryce K. Nielsen wrote:
> > There is similar stuff for C# and C++ (XMLSpy) but nothing for
> > Delphi; I wonder if it is for the lack of demand or oversight
> > of a market. Hint hint for 3rd party app makers :-)
> >
>
> Would be nice, but my gut reaction (without any research) is there's
> not enough market to justify such a product. Seeings how it'd be
> pretty much only for Delphi users, and Delphi users of XML at that,
> we're talking about a very niche, specific market. And the tool would
> be too simple to justify a high price or else no one would buy it.
> No, it'd probably have to be pretty low-priced (my guess no more than
> one hundred dollars).
>
> IMHO, it's something that would only happen if the tool had been
> developed in-house and then someone thought "let's take this to
> market". The only other possibility would be a feature tacked onto
> some other tool, kinda like what XMLSpy does.
All valid points. This is one of those rare times I find myself
in a position to *have* *to* agree with an arguement. Grudgingly :-)
> > Or, am I missing a whole lotta simpler way?
>
> I actually do this quite often in ADO. A recordset field can be
> another, nested recordset. So you can potentially nest as much of a
> hierarchy as you want. Then, when you save the top-level recordset as
> an XML file, it saves all the child recordsets too. In effect, with
> little VCL configuration, I've got my read/write hierarchical data
> structure. The XML itself isn't very clean (I hate looking at raw ADO
> XML), but I never need to mess with the XML, rather just save/load it
> and the Data-Aware controls take care of the rest.
Couple of years ago I wrote something called XMLDataset (open source)
that did much of this without child recordsets. It is not too tough
to introduce recordsets into it.
Why I did not do the next step was because I did not like the idea
of having to manipulate 'TDataSetField's (which would otherwise be
usual and simple objects) through TDataset.
But, interestingly, your ADO usage example has given me an idea:
Since a lot of the grunt work in turning an XML file/stream into
something Delphi can understand has already been done in the effort
of turning it into a dataset, I could actually use that dataset
representation (with its child TDataSetField stuff) to turn it into
pascal code.
Can be done. Writing a vizard to produce a pascal unit should not
be too tough.
I wish someone else had done that already ;-)
So, now, my question is: Has anyone done anything that turns a
TDataset into a TCollection/TCollectionItem structure.. I suppose
things like InstantObjects come to mind. I've got to look into it.
Thank you for inspiration.
Cheers,
Adem
- Next message: Jan Mitrovics: "Re: XSD to Pascal Objects?"
- Previous message: Robert: "Re: Looking for database that is easy to install"
- In reply to: Bryce K. Nielsen: "Re: XSD to Pascal Objects?"
- Next in thread: Jan Mitrovics: "Re: XSD to Pascal Objects?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|