Click here to Skip to main content
12,998,892 members (50,012 online)
Rate this:
Please Sign up or sign in to vote.
See more:

I have one XSD file and i want to generate file in XML format.

i am following this approach mention below:-

=> Create dataset from the xsd file.
=> Dataset will have tables say table1,table2,table3,table4,table5,table6 ,table7 ,table8, table9
=> You have the main data in Maintable with assume 50 columns.
=> From MainTable pick columns , create a view and copy data to respective table in Dataset ex: column1 , column2 from MainTable to Table1 of Dataset.
=> Proceed similarly and fill the dataset with all values from MainTable.
=> Now finally Dataset is ready.
=> From Dataset using WriteXML you can create XML file , which is 2 lines of code.

But, i am not able to insert the values for primary Key column and Foriegn Key Column.
I m Getting an Error:_
ForeignKeyConstraint Loans_Loan requires the child key values (1) to exist in the parent table.

Any idea how go with the approach and get the output file in xml format.

Thanks in advance ...
Posted 30-Nov-12 1:46am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170622.1 | Last Updated 30 Nov 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100