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

DataSet or Classes

I must work with the xml files. Load data from xml, change it, save it. What
is the best idea? To use ADO.NET, I mean to load data from xml to DataSet,
or create classes and work with these classes (something common with
"Castor").

Thanks,

Ruslan
Nov 11 '05 #1
2 1685
Ruslan,

It depends.

Are you familiar with DataSets and does your data map easily to them?

If so, use the DataSet.It's a great interface. However, it won't handle all
XML data structures.

A good alternative is the XML DOM.

Kathleen
"Ruslan" <ru*********@hotmail.com> wrote in message
news:ug**************@TK2MSFTNGP11.phx.gbl...
I must work with the xml files. Load data from xml, change it, save it. What is the best idea? To use ADO.NET, I mean to load data from xml to DataSet,
or create classes and work with these classes (something common with
"Castor").

Thanks,

Ruslan

Nov 11 '05 #2
I would recommend trying the Xml Serialization mechanism.
(not quite like Castor, something more like JAXB, or what JAXB wuold like to
be).

It works for most of the basic cases and you may find it sufficient.
In fact though you don't explicitly work with XML when using this mechanism.
In your code, you work with objects. You read and save the objects, and the
XML is slurped in, or emitted, auto-magically. In your code you would never
touch the DOM or refer to an XmlNode etc.

-Dino
"Steve B. [Labo.Net]" <n.**********************@supinfo.com> wrote in
message news:%2***************@tk2msftngp13.phx.gbl...
You can also use serialisation ...
Create a class using same property than your xml file, and use serialization / deserialization to convert object->xml et xml->object.
Unfortunetally, all xml file cannot be used using this technic

Steve

"Ruslan" <ru*********@hotmail.com> a écrit dans le message de
news:ug**************@TK2MSFTNGP11.phx.gbl...
I must work with the xml files. Load data from xml, change it, save it.

What
is the best idea? To use ADO.NET, I mean to load data from xml to DataSet, or create classes and work with these classes (something common with
"Castor").

Thanks,

Ruslan


Nov 11 '05 #3

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

Similar topics

1
by: Son Matt | last post by:
This is new territory for me so I don't know where to start with a design. I have to render a client side Dataset (5 cols x 20 or more rows) to a canvas. I know I can use...
1
by: Aidan Glendye | last post by:
Hi, I am trying to store various objects within session. Due to the site being hosted in a web farm we are going to have to use either State Server or SQL Server to persist the data in...
4
by: Robert Bravery | last post by:
Hi All, I'm New to VS.net. Trying to figure out this new dataset thingy. Ok so I add a dataadapter with all the correct properties for a table. Then generate the dataset. Now open the dataset and...
2
by: Joe | last post by:
Hi I have a typed dataset and I want to add a method to modify a value in the datarow. I want to inherit from the class so if the XSDchanges I would lose my code when the class regenerates ...
8
by: Hans Greif | last post by:
Hallo, hello, i try to implement a global dataset - singleton based. On www.bakterienforum.de i found a singleton implementation: sealed class SingletonCounter { public int Counter = 0;
13
by: Maxwell2006 | last post by:
Hi, We are having a debate over using DataSet as return value type for web services. The problem is that we don't know whether Java applications can use DataSet
15
by: Joseph Geretz | last post by:
I'm a bit puzzled by the current recommendation not to send Datasets or Datatables between application tiers. http://support.microsoft.com/kb/306134 ...
2
by: Magnus Bergh | last post by:
I got a weird problem with designer. I have created a spearate assembly (DLL) containing my dataset classes and other classes which are shared bewteen the projects in the solution. When I try to...
3
by: =?Utf-8?B?UGV0ZXI=?= | last post by:
I have created some datasets and they are created with oledb data provider. Now, I want to change them to sqlclient. How can I change it?
5
by: Simon Woods | last post by:
Hi Does anyone know if there any dotnet software out there which converts a dataset into a collection of custom objects, programmatically i.e. actually creates the class structure and collection...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.