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

xml and data sets

Hi,

I am trying to put some XXL comde in a database column, and I am using a
dataset to edit it...

let's imagine this scenario

<?xml version = "1.0"?>
<root>
<class>
<student studentID="13429" name = "John"/>
<student studentID="13430" name = "Mary"/>
</class>
</root>

I can manipulate at easy everything except creating students inside the
class...

How can I do it using a DataSet?
Dec 12 '05 #1
2 1103
Create a DataSet with a single DataTable in it. Add the columns necessary to
the DataTable, and set the type of each column. Then read each "student"
element in the XML file, getting the attribute values from the element, and
reading them into a new row in the DataTable for each element, putting each
attribute value into the appropriate column.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
You can lead a fish to a bicycle,
but you can't make it stink.

"Diogo Alves - Software Developer"
<Di*************************@discussions.microsoft .com> wrote in message
news:10**********************************@microsof t.com...
Hi,

I am trying to put some XXL comde in a database column, and I am using a
dataset to edit it...

let's imagine this scenario

<?xml version = "1.0"?>
<root>
<class>
<student studentID="13429" name = "John"/>
<student studentID="13430" name = "Mary"/>
</class>
</root>

I can manipulate at easy everything except creating students inside the
class...

How can I do it using a DataSet?

Dec 12 '05 #2
On Mon, 12 Dec 2005 03:56:01 -0800, "Diogo Alves - Software Developer"
<Di*************************@discussions.microsoft .com> wrote:
Hi,

I am trying to put some XXL comde in a database column, and I am using a
dataset to edit it...

let's imagine this scenario

<?xml version = "1.0"?>
<root>
<class>
<student studentID="13429" name = "John"/>
<student studentID="13430" name = "Mary"/>
</class>
</root>

I can manipulate at easy everything except creating students inside the
class...

How can I do it using a DataSet?


Have you tried:

<?xml version = "1.0"?>
<root>
<class>
<student>
<studentID>13429</studentID>
<studentName>John</studentName>
</student>
<student>
<studentID>13430</studentID>
<studentName>Mary</studentName>
</student>
</class>
</root>
rossum
The ultimate truth is that there is no ultimate truth
Dec 12 '05 #3

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

Similar topics

2
by: ben moretti | last post by:
hi i'm learning python, and one area i'd use it for is data management in scientific computing. in the case i've tried i want to reformat a data file from a normalised list to a matrix with some...
6
by: Saikrishna | last post by:
Hi friends, I am trying to choose the best possible data structure for the probelm I am going to describe now. I have lets say tens of thousands of numbers in file1 and tens of thousands of...
9
by: Eric Lilja | last post by:
Hello, consider the following two functions: /* function foo() */ void foo() { float y = 0.0f; float sum = 0.0f; for(int i = 0; i < num; ++i) {
4
by: Oyvind | last post by:
I'm working on a Windows forms/C# database application. My background is 6-7 years of VB 4 - 6, MS Access, VC++, mixed in with a lot of T-SQL and MS SQL Server in general and some OOA/OOD. ...
2
by: Matthias S. | last post by:
Hi, I have to write an application which extensively uses an SQL Database. For a simple example say I have the following tables with the appropriate fields. 1. Company (ID, Name,...
2
by: jason | last post by:
the enterprise is going to eventually convert the existing ASP Classic website to ASP.NET until that time, development has already begun for a C# library of business objects. for the most part,...
6
by: Ben Finney | last post by:
Howdy all, Summary: I'm looking for idioms in unit tests for factoring out repetitive iteration over test data. I explain my current practice, and why it's unsatisfactory. When following...
2
by: alex.mcshane | last post by:
Hi - I would be grateful for any knowledge regarding the following. Whilst QAing Stored Procedures developed by colleagues, I noticed the following 'superflous' parameter specifications:- 1)...
11
by: mwt | last post by:
Hi. I'm reworking a little app I wrote, in order to separate the data from the UI. As a start, I wanted to create a iron-clad data recepticle that will hold all the important values, and stand up...
3
by: ArmageddonAsh | last post by:
I'm trying to make an application that will allow the user to enter data into a flexgrid (that's done) and then save the data from that flexgrid into a CSV file but even though the file is made none...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.