|
|
|
start date: Mon, 20 Aug 2007 08:31:27 -0700,
posted on: microsoft.public.dotnet.framework.adonet
back
| Thread Index |
|
1
DC
|
|
2
Robbe Morris - [MVP] C#
|
How to translate heterogenious XML files to typed datasets?
Hi,
I have to load xml data via http for some function calls. Using
different providers, this data must be represented in objects of the
same type for my client (web) application to be used. I am using VS
2005.
I thought about using typed datasets as data objects, so I would
generate xsds for those. Ideally, I would like to easily map the XML
fields of the providers to the datasets. I guess I have to use xslt
for this translation, or is there a better way?
I am thankful for any hint on this, espacially if there is a much
easier way than xml -> xslt -> (xsd ->) dataset.
Regards
DC
Date:Mon, 20 Aug 2007 08:31:27 -0700
Author:
|
Re: How to translate heterogenious XML files to typed datasets?
You may want to look at this approach:
http://www.eggheadcafe.com/articles/adonet_source_code_generator.asp
Download that code sample and review the way it uses custom attributes
to dynamically map a DataTable to a custom class set of properties.
You could use the same approach with your xml documents.
--
Robbe Morris
..NET PropertyGrid Control - ListBox, ComboBox, and Custom Classes
http://www.eggheadcafe.com/tutorials/aspnet/270e9432-d236-47e7-b1af-5cd3abe27a75/net-propertygrid-control.aspx
"DC" wrote in message
news:1187623887.252050.98990@a39g2000hsc.googlegroups.com...
> Hi,
>
> I have to load xml data via http for some function calls. Using
> different providers, this data must be represented in objects of the
> same type for my client (web) application to be used. I am using VS
> 2005.
>
> I thought about using typed datasets as data objects, so I would
> generate xsds for those. Ideally, I would like to easily map the XML
> fields of the providers to the datasets. I guess I have to use xslt
> for this translation, or is there a better way?
>
> I am thankful for any hint on this, espacially if there is a much
> easier way than xml -> xslt -> (xsd ->) dataset.
>
> Regards
> DC
>
Date:Mon, 20 Aug 2007 11:44:05 -0400
Author:
|
|
|