If there is an easier way than the Dataset object to process the database, please let me know.
Any help would be most appreciated.
Thanks,
Bruce
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sam HobbsPosted Dec 4, 2009, 2:31 AM
I admit that the XmlSerializer class and related classes are very frustrating to understand. I really think the documentation is very inadequate compared to what it could be. Once we understand a few basics it can be very productive. The following code works with the sample data you provided.
First, I created a separate file for the data definition.
Then the code is:
Jayhawks RockPosted Dec 3, 2009, 6:00 PM
Thanks again,
Bruce
Sam HobbsPosted Dec 3, 2009, 1:09 AM
The following console program is a skeleton of what you would need. This sample will only read in the names of each DatabaseItem. You probably can use the XmlSerializer class to read in all of the data but as I said I don't know the format of all your data.
Note that the InnerException member of an exception can be null and you need to check for null there but I forgot to modify the sample code for that. Otherwise you can use this code as-is to try out use of the XmlSerializer class. It is one way that can make things easy.
Amit ChoudharyPosted Dec 3, 2009, 12:04 AM
Using dataset to manipulate the data from an xml file is itself and easiest way other wise you have to manipulate that xml tags using Your programming logic that itself have its complexity .... so just try Dataset it has lots of functions and properties you can use to manipulate its Data....