QA.TechInterviews.com - your tech questions answered
How Do I Use A Xsd Document To Extract Data From A MSSQL Server Db And Create A XML File Of That Usi
Hi,
I have created a XSD file now I want to use it in MS VS .net 2003/ 2005 to extract data from multiple tables like customes and their orders and the bills for those orders and create an XML file based on the structures setup in XSD . Would like to c a working example on the net if possible could someone pls guide me . I require to create an executable so any one can use it I have another utility wherein they can modify the xsd as per the requirements .
Many thanks
Meherdad
try running this sample query against your db and check out the output. It will output the data in XML format. This will hopefully give you a start. Unfortunatly I don't have any C# code for you.

select *
from orders
for xml auto, elements

here is a good tutorial on the basics of getting data from SQL server in XML format and using XML schemas

http://sqljunkies.com/Article/53969753-E560-4923-89AC-0AA3C8ECACDC.scuk
try running this sample query against your db and check out the output. It will output the data in XML format. This will hopefully give you a start. Unfortunatly I don't have any C# code for you.

select *
from orders
for xml auto, elements

here is a good tutorial on the basics of getting data from SQL server in XML format and using XML schemas

http://sqljunkies.com/Article/53969753-E560-4923-89AC-0AA3C8ECACDC.scuk

Back to QA. TechInterviews.com. Powered by Yahoo! Answers and TechInterviews.com community.