Home » questions » How do i use a xsd document to extract data from a MSSQL server db and create a XML file of that usi

How do i use a xsd document to extract data from a MSSQL server db and create a XML file of that usi

2006-08-03 02:16:35, Category: Programming & Design
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

Answers

  1. jmfc

    On 2006-08-03 07:28:03


    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