How to use Xml feature for a DataSet when XmlDataDocument is obsolete

T

Tony

Hello!

According to the documentation is the XmlDataDocument Class obsolete.
This was a useful class because of the following
"You can think of an XmlDataDocument as an XmlDocument that knows how to
communicate with a DataSet object.
The XmlDataDocument class is derived from XmlDocument class, so an
XmlDataDocument object exposes all the
same feature as an XmlDocument.
The XmlDataDocument class adds two key feature. First, it lets you easily
load the contents of a DataSet into XmlDocument, and vice versa. Second, the
XmlDataDocument also synchronizes itself with the DataSet, If the DataSet
object contains data, that same
data will be available through the XmlDataDocument object. Also, when you
change the contents of one object, that change will affect the other."

If this XmlDataDocument is removed what is the best way to use the DataSet
class as XML feature.
I could for example do the following but that is not as good as to use the
XmlDataDocument.
1. Use the WriteXml on the DataSet object to create an Xml document with the
contens of the DataSet
2.Create an XmlDocument object
3.Use the Load method on the XmlDocument object

//Tony
 
A

Arne Vajhøj

According to the documentation is the XmlDataDocument Class obsolete.
This was a useful class because of the following
"You can think of an XmlDataDocument as an XmlDocument that knows how to
communicate with a DataSet object.
The XmlDataDocument class is derived from XmlDocument class, so an
XmlDataDocument object exposes all the
same feature as an XmlDocument.
The XmlDataDocument class adds two key feature. First, it lets you
easily load the contents of a DataSet into XmlDocument, and vice versa.
Second, the XmlDataDocument also synchronizes itself with the DataSet,
If the DataSet object contains data, that same
data will be available through the XmlDataDocument object. Also, when
you change the contents of one object, that change will affect the other."

If this XmlDataDocument is removed what is the best way to use the
DataSet class as XML feature.
I could for example do the following but that is not as good as to use
the XmlDataDocument.
1. Use the WriteXml on the DataSet object to create an Xml document with
the contens of the DataSet
2.Create an XmlDocument object
3.Use the Load method on the XmlDocument object

I would do something like that (DataSet GetXml instead
of WriteXml though) if I needed to do it.

But I would most likely not need to do it. It does not make
sense to to work with some data both in database and in XML.

Arne
 
T

Tony

Arne Vajhøj said:
I would do something like that (DataSet GetXml instead
of WriteXml though) if I needed to do it.

But I would most likely not need to do it. It does not make
sense to to work with some data both in database and in XML.

Arne

So you mean making the class XmlDataDocument obsolent is not a big deal to
miss.

//Tony
 

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

Top