المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Load XML into DataSet



C# Programming
07-28-2009, 07:30 PM
I'm trying to load a XML file into a DataSet object. Here's my code:

string filename = @"c:\dev\users.xml";
DataSet ds = new DataSet("Users");
ds.ReadXml(filename);


After the call to ReadXml(), I have column names but no data. What am I doing wrong?


"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001