Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / December 2005

Tip: Looking for answers? Try searching our database.

xml and data sets

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Diogo Alves - Software Developer - 12 Dec 2005 11:56 GMT
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?
Kevin Spencer - 12 Dec 2005 14:59 GMT
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.

Signature

HTH,

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

> Hi,
>
[quoted text clipped - 15 lines]
>
> How can I do it using a DataSet?
rossum - 12 Dec 2005 22:01 GMT
>Hi,
>
[quoted text clipped - 15 lines]
>
>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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.