Click here to Skip to main content
15,891,033 members

I want to generate output in XML Format from XSD input file

asbis asked:

Open original thread
Hi,

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 ...
Tags: C#, ASP.NET

Plain Text
ASM
ASP
ASP.NET
BASIC
BAT
C#
C++
COBOL
CoffeeScript
CSS
Dart
dbase
F#
FORTRAN
HTML
Java
Javascript
Kotlin
Lua
MIDL
MSIL
ObjectiveC
Pascal
PERL
PHP
PowerShell
Python
Razor
Ruby
Scala
Shell
SLN
SQL
Swift
T4
Terminal
TypeScript
VB
VBScript
XML
YAML

Preview



When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
  4. Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question.
Let's work to help developers, not make them feel stupid.
Please note that all posts will be submitted under the http://www.codeproject.com/info/cpol10.aspx.



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900