BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Import XML structure

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi XML
View previous topic :: View next topic  
Author Message
Broeden
Guest





PostPosted: Tue Jan 17, 2006 2:41 pm    Post subject: Import XML structure Reply with 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
Trevor de Koekkoek
Guest





PostPosted: Tue Jan 17, 2006 5:24 pm    Post subject: Re: Import XML structure Reply with 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

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





PostPosted: Wed Jan 18, 2006 5:23 pm    Post subject: Re: Import XML structure Reply with 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:
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





PostPosted: Wed Jan 18, 2006 7:41 pm    Post subject: Re: Import XML structure Reply with 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

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





PostPosted: Fri Jan 20, 2006 6:31 am    Post subject: Re: Import XML structure Reply with 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:
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





PostPosted: Fri Jan 20, 2006 10:57 am    Post subject: Re: Import XML structure Reply with quote


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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi XML All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.