Board index » delphi » How to do anything with XML and BDS?

How to do anything with XML and BDS?


2005-04-01 10:21:49 PM
delphi163
We have a simple (v. simple) XML file with a schema and are currently
using it to investigate XML in .NET
What we want to do is have a form with a grid on it showing the data
within the XML file.
With MSVS this is trivial:
1.Import the schema into MSVS
2.Create a DataSet (a wizard guides you through linking to the XML but
it's mostly automatic)
3.Add a grid onto the form and link it to the data set.
With BDS we can not get it to do anything meaningful at all.
Working with WinForms just doesn't achieve anything much. We ran the
Data Binding Wizard but it produced code that won't even compile so
that wasn't much help.
After creating a DataSet if we try and create an instance we get the
enigmatic error "Cannot create an instance of 'XMLFileUnit1.XMLFile1'.
Confirm the class name is a valid DataSet class."
Working the VCL.NET we got as far as dropping a TXMLDocument onto the
form and pointing it at our XML file but then couldn't see anything
more to with it. The help suggests a few components but none of them
are on the component pallet.
We've been struggling with this over several hours now and have pretty
much given up with it. I can only assume we're missing something but
since this is Delphi Architect we should have all the components
Borland have released.
Can anyone explain where we're going wrong? Is XML support just that
broken or have we just missed the point?
--
Andrue Cope [TeamB]
[Bicester, Uk]
info.borland.com/newsgroups/guide.html
 
 

Re:How to do anything with XML and BDS?

glad to see someone questioning XML support in delphi.
"Andrue Cope [TeamB]" <XXXX@XXXXX.COM>writes
Quote
We have a simple (v. simple) XML file with a schema and are currently
using it to investigate XML in .NET

What we want to do is have a form with a grid on it showing the data
within the XML file.

With MSVS this is trivial:

1.Import the schema into MSVS
2.Create a DataSet (a wizard guides you through linking to the XML but
it's mostly automatic)
3.Add a grid onto the form and link it to the data set.

With BDS we can not get it to do anything meaningful at all.

Working with WinForms just doesn't achieve anything much. We ran the
Data Binding Wizard but it produced code that won't even compile so
that wasn't much help.

After creating a DataSet if we try and create an instance we get the
enigmatic error "Cannot create an instance of 'XMLFileUnit1.XMLFile1'.
Confirm the class name is a valid DataSet class."

Working the VCL.NET we got as far as dropping a TXMLDocument onto the
form and pointing it at our XML file but then couldn't see anything
more to with it. The help suggests a few components but none of them
are on the component pallet.

We've been struggling with this over several hours now and have pretty
much given up with it. I can only assume we're missing something but
since this is Delphi Architect we should have all the components
Borland have released.

Can anyone explain where we're going wrong? Is XML support just that
broken or have we just missed the point?
--
Andrue Cope [TeamB]
[Bicester, Uk]
info.borland.com/newsgroups/guide.html
 

Re:How to do anything with XML and BDS?

Cameron writes:
Quote
glad to see someone questioning XML support in delphi.
Hmmm. Well based on responses to my question and other issues I will
see how far I can escalate this using my awesome TeamB status :)
Not that I expect a huge response but the comparison with VS should
turn a few heads especially with the forthcoming C++ support in BDS.
--
Andrue Cope [TeamB]
[Bicester, Uk]
info.borland.com/newsgroups/guide.html
 

Re:How to do anything with XML and BDS?

Hi Andrue,
Quote
Working with WinForms just doesn't achieve anything much. We ran the
Data Binding Wizard but it produced code that won't even compile so
that wasn't much help.
I agree it doesn't compile, but have you tried to fix the compiler
errors? It took me less than a minute to get it to work (I'll put a
short article on my site if you want the "generic" details).
Quote
Working the VCL.NET we got as far as dropping a TXMLDocument onto the
form and pointing it at our XML file but then couldn't see anything
more to with it. The help suggests a few components but none of them
are on the component pallet.
Have you tried the XML Mapper, to transform the XML document to a
DataSet (although this is only available in the Enterprise edition of
Delphi 2005)...
Quote
Andrue Cope [TeamB]
Groetjes,
Bob Swart (aka Dr.Bob - www.DrBob42.com)
--
Bob Swart Training & Consultancy (eBob42) - Borland Technology Partner
Delphi for .NET / ASP.NET courseware - www.drbob42.com/training
 

Re:How to do anything with XML and BDS?

Bob Swart writes:
Quote
I agree it doesn't compile, but have you tried to fix the compiler
errors? It took me less than a minute to get it to work (I'll put a
short article on my site if you want the "generic" details).
We didn't, yet. This was one of those Friday afternoon play around
exercises. We are currently investigating a lot of technology because
we're at the start of a new development cycle. We wanted to compare VS
against BDS just to see how they stood up.
Quote
Have you tried the XML Mapper, to transform the XML document to a
DataSet (although this is only available in the Enterprise edition of
Delphi 2005)...
I will certainly look into that. As a BCB user my loyalty to Borland
has taken a battering but I would still rather use their solutions. And
yes, somehow I do seem to have ended up with an Enterprise version of
Delphi. Odd that ;-)
--
Andrue Cope [TeamB]
[Bicester, Uk]
info.borland.com/newsgroups/guide.html