xml and data sets

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
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"
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top