 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Broeden Guest
|
Posted: Tue Jan 17, 2006 2:41 pm Post subject: Import XML structure |
|
|
Does anyone know of a good method to import a XML file into Delphi win32. The XML file is created in .Net with XML serialization. It would be easy to bring in back to .Net with XML deserialization, but the problem is that at need to import it to a Win32 application.
The .Net application uses Arraylist objects which does not exist in win32.
The XML file consists of customers, each customers has one to many orders and each order has one to many order items. Which is the easiest way to import this to Delphi win32.
/Broeden
|
|
| Back to top |
|
 |
Trevor de Koekkoek Guest
|
Posted: Tue Jan 17, 2006 5:24 pm Post subject: Re: Import XML structure |
|
|
If the XML is a .NET dataset, use the GekkoDotNetDataSet component in Delphi
to read it:
http://www.gekko-software.nl/DotNet/Art08.htm
Otherwise, you can do 1 of two things(well there are others, but for
simplicity): Use XML Mapper utility to map one XML schema into a Delphi
ClientDataSet, or alternatively import the schema using the XML databinding
wizard. This will allow you to create a custom class that reads and writes
from the XML data file.
-Trevor
"Broeden" <hihansson (AT) hotmail (DOT) com> wrote
| Quote: |
Does anyone know of a good method to import a XML file into Delphi win32.
The XML file is created in .Net with XML serialization. It would be easy
to bring in back to .Net with XML deserialization, but the problem is that
at need to import it to a Win32 application.
The .Net application uses Arraylist objects which does not exist in win32.
The XML file consists of customers, each customers has one to many orders
and each order has one to many order items. Which is the easiest way to
import this to Delphi win32.
/Broeden
|
|
|
| Back to top |
|
 |
Broeden Guest
|
Posted: Wed Jan 18, 2006 5:23 pm Post subject: Re: Import XML structure |
|
|
Thanks for your help, it got me on the road….
I have now used the XML Mapper to make transformation files. No big problems.
I can now get my XML-file into a clientdataset. But now the problem is that I don't know how to programmatically reach the nested datasets (e.g. orders and order items) that pops up in new windows when double-clicking the "Dataset" fields.
Any suggestions?
/Broeden
"Trevor de Koekkoek" <trevor_dek (AT) yahoo (DOT) com> wrote:
| Quote: | If the XML is a .NET dataset, use the GekkoDotNetDataSet component in Delphi
to read it:
http://www.gekko-software.nl/DotNet/Art08.htm
Otherwise, you can do 1 of two things(well there are others, but for
simplicity): Use XML Mapper utility to map one XML schema into a Delphi
ClientDataSet, or alternatively import the schema using the XML databinding
wizard. This will allow you to create a custom class that reads and writes
from the XML data file.
-Trevor
"Broeden" <hihansson (AT) hotmail (DOT) com> wrote in message
news:43cd102c$1 (AT) newsgroups (DOT) borland.com...
Does anyone know of a good method to import a XML file into Delphi win32.
The XML file is created in .Net with XML serialization. It would be easy
to bring in back to .Net with XML deserialization, but the problem is that
at need to import it to a Win32 application.
The .Net application uses Arraylist objects which does not exist in win32.
The XML file consists of customers, each customers has one to many orders
and each order has one to many order items. Which is the easiest way to
import this to Delphi win32.
/Broeden
|
|
|
| Back to top |
|
 |
Trevor de Koekkoek Guest
|
Posted: Wed Jan 18, 2006 7:41 pm Post subject: Re: Import XML structure |
|
|
The nested dataset is actually a field of type TDataSetField. That field
has a DataSet property on it. So if you can access the field, then you
should be able to access the dataset.
Having said that, unless you really need datasets in your application, the
databinding wizard might be a better approach because then you are accessing
xml nodes by named properties, which makes for a more intuitive, less
error-prone approach than using datasets.
-Trevor
"Broeden" <hihansson (AT) hotmail (DOT) com> wrote
| Quote: |
Thanks for your help, it got me on the road..
I have now used the XML Mapper to make transformation files. No big
problems.
I can now get my XML-file into a clientdataset. But now the problem is
that I don't know how to programmatically reach the nested datasets (e.g.
orders and order items) that pops up in new windows when double-clicking
the "Dataset" fields.
Any suggestions?
/Broeden
"Trevor de Koekkoek" <trevor_dek (AT) yahoo (DOT) com> wrote:
If the XML is a .NET dataset, use the GekkoDotNetDataSet component in
Delphi
to read it:
http://www.gekko-software.nl/DotNet/Art08.htm
Otherwise, you can do 1 of two things(well there are others, but for
simplicity): Use XML Mapper utility to map one XML schema into a Delphi
ClientDataSet, or alternatively import the schema using the XML
databinding
wizard. This will allow you to create a custom class that reads and
writes
from the XML data file.
-Trevor
"Broeden" <hihansson (AT) hotmail (DOT) com> wrote in message
news:43cd102c$1 (AT) newsgroups (DOT) borland.com...
Does anyone know of a good method to import a XML file into Delphi
win32.
The XML file is created in .Net with XML serialization. It would be easy
to bring in back to .Net with XML deserialization, but the problem is
that
at need to import it to a Win32 application.
The .Net application uses Arraylist objects which does not exist in
win32.
The XML file consists of customers, each customers has one to many
orders
and each order has one to many order items. Which is the easiest way to
import this to Delphi win32.
/Broeden
|
|
|
| Back to top |
|
 |
Broeden Guest
|
Posted: Fri Jan 20, 2006 6:31 am Post subject: Re: Import XML structure |
|
|
Thanks again!
I think you are right. Data binding is probably a better method.
I have now imported the XML-file via data binding. But now is the next problem to update the XML-file that is modified in Delphi. I can't find any appropriate method for saving to a XML file in the data binding file.
Any ideas?
"Trevor de Koekkoek" <trevor_dek (AT) yahoo (DOT) com> wrote:
| Quote: | The nested dataset is actually a field of type TDataSetField. That field
has a DataSet property on it. So if you can access the field, then you
should be able to access the dataset.
Having said that, unless you really need datasets in your application, the
databinding wizard might be a better approach because then you are accessing
xml nodes by named properties, which makes for a more intuitive, less
error-prone approach than using datasets.
-Trevor
"Broeden" <hihansson (AT) hotmail (DOT) com> wrote in message
news:43ce878a$1 (AT) newsgroups (DOT) borland.com...
Thanks for your help, it got me on the road..
I have now used the XML Mapper to make transformation files. No big
problems.
I can now get my XML-file into a clientdataset. But now the problem is
that I don't know how to programmatically reach the nested datasets (e.g.
orders and order items) that pops up in new windows when double-clicking
the "Dataset" fields.
Any suggestions?
/Broeden
"Trevor de Koekkoek" <trevor_dek (AT) yahoo (DOT) com> wrote:
If the XML is a .NET dataset, use the GekkoDotNetDataSet component in
Delphi
to read it:
http://www.gekko-software.nl/DotNet/Art08.htm
Otherwise, you can do 1 of two things(well there are others, but for
simplicity): Use XML Mapper utility to map one XML schema into a Delphi
ClientDataSet, or alternatively import the schema using the XML
databinding
wizard. This will allow you to create a custom class that reads and
writes
from the XML data file.
-Trevor
"Broeden" <hihansson (AT) hotmail (DOT) com> wrote in message
news:43cd102c$1 (AT) newsgroups (DOT) borland.com...
Does anyone know of a good method to import a XML file into Delphi
win32.
The XML file is created in .Net with XML serialization. It would be easy
to bring in back to .Net with XML deserialization, but the problem is
that
at need to import it to a Win32 application.
The .Net application uses Arraylist objects which does not exist in
win32.
The XML file consists of customers, each customers has one to many
orders
and each order has one to many order items. Which is the easiest way to
import this to Delphi win32.
/Broeden
|
|
|
| Back to top |
|
 |
Broeden Guest
|
Posted: Fri Jan 20, 2006 10:57 am Post subject: Re: Import XML structure |
|
|
I think I found the answer myself. I have use the data binding unit together with a XMLdocument component, which has a SaveToFile method.
"Broeden" <hihansson (AT) hotmail (DOT) com> wrote:
| Quote: |
Thanks again!
I think you are right. Data binding is probably a better method.
I have now imported the XML-file via data binding. But now is the next problem to update the XML-file that is modified in Delphi. I can't find any appropriate method for saving to a XML file in the data binding file.
Any ideas?
"Trevor de Koekkoek" <trevor_dek (AT) yahoo (DOT) com> wrote:
The nested dataset is actually a field of type TDataSetField. That field
has a DataSet property on it. So if you can access the field, then you
should be able to access the dataset.
Having said that, unless you really need datasets in your application, the
databinding wizard might be a better approach because then you are accessing
xml nodes by named properties, which makes for a more intuitive, less
error-prone approach than using datasets.
-Trevor
"Broeden" <hihansson (AT) hotmail (DOT) com> wrote in message
news:43ce878a$1 (AT) newsgroups (DOT) borland.com...
Thanks for your help, it got me on the road..
I have now used the XML Mapper to make transformation files. No big
problems.
I can now get my XML-file into a clientdataset. But now the problem is
that I don't know how to programmatically reach the nested datasets (e.g.
orders and order items) that pops up in new windows when double-clicking
the "Dataset" fields.
Any suggestions?
/Broeden
"Trevor de Koekkoek" <trevor_dek (AT) yahoo (DOT) com> wrote:
If the XML is a .NET dataset, use the GekkoDotNetDataSet component in
Delphi
to read it:
http://www.gekko-software.nl/DotNet/Art08.htm
Otherwise, you can do 1 of two things(well there are others, but for
simplicity): Use XML Mapper utility to map one XML schema into a Delphi
ClientDataSet, or alternatively import the schema using the XML
databinding
wizard. This will allow you to create a custom class that reads and
writes
from the XML data file.
-Trevor
"Broeden" <hihansson (AT) hotmail (DOT) com> wrote in message
news:43cd102c$1 (AT) newsgroups (DOT) borland.com...
Does anyone know of a good method to import a XML file into Delphi
win32.
The XML file is created in .Net with XML serialization. It would be easy
to bring in back to .Net with XML deserialization, but the problem is
that
at need to import it to a Win32 application.
The .Net application uses Arraylist objects which does not exist in
win32.
The XML file consists of customers, each customers has one to many
orders
and each order has one to many order items. Which is the easiest way to
import this to Delphi win32.
/Broeden
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|