How to translate heterogenious XML files to typed datasets?

D

DC

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
 
D

DC

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 Classeshttp://www.eggheadcafe.com/tutorials/aspnet/270e9432-d236-47e7-b1af-5...










- Zitierten Text anzeigen -

Thank you Robbe, I looked at your approach and this looks like one
fine ORM, but since I need the possibility to easily adopt to several
ever changing xml files I chose the xml -> xslt -> xsd -> typed
dataset road. Which works fine, as far as I can tell.

Kind regards
DC
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top