473,320 Members | 1,863 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

XML, XSD & dataset

Sam
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
Nov 12 '05 #1
2 2185
Use the ReadXml/WriteXml methods on the DataSet class.

"Sam" <sa*@gmail.com> wrote in message
news:e9**************@TK2MSFTNGP10.phx.gbl...
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

Nov 12 '05 #2
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

"Chris Lovett" wrote:
Use the ReadXml/WriteXml methods on the DataSet class.

"Sam" <sa*@gmail.com> wrote in message
news:e9**************@TK2MSFTNGP10.phx.gbl...
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


Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Linesh Gajera | last post by:
Hi Guys i having the same problem with Strongly typed dataset, I have created a stronsetly typed dataset by draging table from Server explorer and now i have retreived xml from SQL server 2000...
1
by: Scott M. | last post by:
I have created a strongly typed dataset and populated it with data in my data layer. I have confirmed that the DataSet does, in fact contain my data and that there is a schema governing this data...
1
by: Mike Malter | last post by:
I am just starting to work with reflection and I want to create a log that saves relevant information if a method call fails so I can call that method again later using reflection. I am...
13
by: Adie | last post by:
Hi, is this not possible? public DataSet getDimensions() { } public SqlDataReader getDimensions() { }
0
by: ʹÃûÑï | last post by:
ORA-03114: not connected to ORACLE && MS's Bug?? DataBase:Oracle 817 using OracleClient,net framework 1.1 I'm using ADO.Net in C# with Oracle 817. and following is my public data access...
0
by: Michelle Keys | last post by:
I am trying to call a print function to print a string from a database using javascript. Which is RC_DATA of Varchar2(2500). This is a javascript is not being used. I have a thing that needs to...
5
by: jqpdev | last post by:
Hello all... I'm coming from a Borland Delphi background. Delphi has a specific component called a Data Module. In the designer the Data Module behaves like a windows form. A developer can...
1
by: Vikram | last post by:
i am adding a row in dataset , in which i want to add &nbsp; (space chracter for html) and then want to bind dataset to asp.net dropdown list box. But & automatically converted to &amp chracter....
10
by: Asaf | last post by:
Hi, I am trying to Compress & Decompress a DataSet. When running this code I am receiving the error: System.Xml.XmlException was unhandled Message="Root element is missing."...
17
by: Fred Nelson | last post by:
Hi: I have written several web applications that obtain their connection strings from the web.config file. This is very easy to use and it makes it easy to move an app from development into...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.