tags:

views:

611

answers:

2

Hi,

I have an application that needs to map relational database to XML. The issue is that the database structure is given (I cannot change it) and the XML Schema is given (comes from WSDL).

I need to let the user of my application to tell the system that a given column in a table is mapped to a given element in the schema. Then my application needs to crate XMLs based on the database data.

Is there a technology that can help me? is there a C# control for that.

Thanks

+1  A: 

XSLT. I think you should dynamically (based on user input) create xslt and transform data from database (dataset?) to xml.

peeles
A: 

What's your database - SQL Server? You can achieve a lot of XML flexibility with the SELECT .... FOR XML statement in SQL Server (most definitely in 2005 and up).

And if that's not flexible enough, then I'd second "peeles" recommendation - do a SELECT...FOR XML first and transform the output using XSLT.

Marc

marc_s