all groups > dotnet xml > june 2005 >
You're in the

dotnet xml

group:

XML, XSD & dataset


XML, XSD & dataset Sam
6/9/2005 9:54:01 PM
dotnet xml:
Hi all.
I have a XSD file and a flat file (txt).
My customer want that I create a XML (with XSD + file data).
OK.
1) I open visual studio
2) I create a typed dataset (read xsd schema)
3) Now, I have the dataset empty

My dataset now contains a complex type in a complex type (like a complex
type invoice whit one header and n record of products).
The question is: how can I write the data of file in dataset?

If I use the xsd.exe tool and obtain the class that this tool creates for
me, how can I use this class from my code?

Tks (and sorry for my english... ;-), bye,
Sam

Re: XML, XSD & dataset Chris Lovett
6/11/2005 3:25:13 PM
Use the ReadXml/WriteXml methods on the DataSet class.

[quoted text, click to view]

Re: XML, XSD & dataset Deepak
6/29/2005 8:24:03 PM
You can create a class from XSD using xsd.exe .
Create an instance of the class. Read the text file and load the properties
of the class.
You can then generate an xml of the instance. The xml generate will conform
to the schema in xsd.
Hope this helps
Thanks
Deepak

[quoted text, click to view]
AddThis Social Bookmark Button