1

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

3 Answers 3

2

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

Sign up to request clarification or add additional context in comments.

Comments

2

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

Comments

0

Select...For sounds simpler; but LINQ in your C# is probably another option.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.