473,396 Members | 1,734 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,396 software developers and data experts.

Getting DataSet into an XML

I'm obtaining a DataSet object and then foreach
loop through it's Rows, aiming at creating a
XML. However, i have two wonderings here.

1. Do i really need to get the individual
elements of a row as an array of Object objects?
I'd prefer string class objects WITHOUT casting
them into it.

2. Is there a smooth way to convert a while
DataSet object into an XML, by any chance?

--
Regards
Konrad Viltersten
----------------------------------------
May all spammers die an agonizing death;
have no burial places; their souls be
chased by demons in Gehenna from one room
to another for all eternity and beyond.
Aug 2 '08 #1
3 1063
K Viltersten wrote:
I'm obtaining a DataSet object and then foreach
loop through it's Rows, aiming at creating a
XML. However, i have two wonderings here.

1. Do i really need to get the individual
elements of a row as an array of Object objects?
I'd prefer string class objects WITHOUT casting
them into it.

2. Is there a smooth way to convert a while
DataSet object into an XML, by any chance?
The DataSet WriteXml method ?

Arne
Aug 2 '08 #2
And how many rooms are in Gehenna anyway?

"Arne Vajhøj" <ar**@vajhoej.dkwrote in message
news:48***********************@news.sunsite.dk...
>K Viltersten wrote:
>I'm obtaining a DataSet object and then foreach
loop through it's Rows, aiming at creating a
XML. However, i have two wonderings here.

1. Do i really need to get the individual
elements of a row as an array of Object objects?
I'd prefer string class objects WITHOUT casting
them into it.

2. Is there a smooth way to convert a while
DataSet object into an XML, by any chance?

The DataSet WriteXml method ?

Arne
Aug 2 '08 #3

DataSet.WriteXml would be the easiest file based.

Check here for an alternate idea, if you want a different xml output format.

http://sholliday.spaces.live.com/Blog/cns!A68482B9628A842A!148.entry
I think you should describe what you're doing in more detail.

What are you starting with?
Where do you want to get to?
Do you want it in a file, memory or what?


"K Viltersten" <tm**@viltersten.comwrote in message
news:6f************@mid.individual.net...
I'm obtaining a DataSet object and then foreach
loop through it's Rows, aiming at creating a
XML. However, i have two wonderings here.

1. Do i really need to get the individual
elements of a row as an array of Object objects?
I'd prefer string class objects WITHOUT casting
them into it.

2. Is there a smooth way to convert a while
DataSet object into an XML, by any chance?

--
Regards
Konrad Viltersten
----------------------------------------
May all spammers die an agonizing death;
have no burial places; their souls be
chased by demons in Gehenna from one room
to another for all eternity and beyond.

Aug 4 '08 #4

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

Similar topics

4
by: Frnak McKenney | last post by:
I'm using an in-core DataSet as an image of my application's 'database' (a multi-table Access97 mdb file). Updates are made to the DataTables within the DataSet via forms with bound TextBoxes,...
3
by: Saso Zagoranski | last post by:
Hi! A question about database tables... I have a SELECT statement: SELECT something FROM someTable WHERE code = @code The parameter code starts with 1 and is autoincremented... Now I want...
1
by: Oleg Shnayderman | last post by:
Hi All, I am very new to C# as well as to SQL. I need to write an application which is connecting to SQL DB and getting all the user's tables and after create a dataset for all the tables in the...
6
by: Erik H. | last post by:
Trying to connect to MySQL db on localhost, and populate datagrid from a dataset using code inline method. Getting the following compile error: Error Message: "CS0246: The type or namespace...
4
by: What-a-Tool | last post by:
I am trying to write a program that will take all the members of a data base, add them to a tree, with all child relations as sub-nodes. I am having a problem getting the parent child relations...
0
by: mike1402 | last post by:
Hi ! I get the error below sometimes when retrieving a big amount of data using Datadapter.Fill(dataset,"table"). But when I send the command Fill again, there is no error. Is it a fault of...
4
by: nch1978 | last post by:
I am new to programming and am sorry if this post is in the wrong area. I have a listbox bound to a table and a datagrid bound to another one with a connection through xml. I can change the data...
3
by: H | last post by:
I have a dataset with Customers, Orders, and Items tables. It has datarelations set between Customers-Orders and Orders-Items It has foreignkeyconstraints with update/delete rules set to cascade...
4
by: =?Utf-8?B?UHVjY2E=?= | last post by:
Why am I getting an error when I passed by ref a dataset to a new form? The message reads "cannot convert from 'ref Paimport.unixAccount' to 'ref System.Data.DataSet'. Paimport is the name of the...
2
by: rocketfire97 | last post by:
I'm trying to call a COM object using C# but having no luck getting values back for passed in ref objects. I've tried the same call using VB.NET and can get data back. How would I implement the...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.