Xml and DataSet

  • Thread starter Ignacio Machin ( .NET/ C# MVP )
  • Start date
I

Ignacio Machin ( .NET/ C# MVP )

Hello!

Xml is used havily when dealing with DataSet. I know that Xml schema is used
by DataSet.
Xml schema is used to verify the structure of an Xml document.

So does this mean that a DataSet is using Xml document internally ?

//Tony

no

The data is stored in collection classes, not in a XML structure. The
XML is used to load/save it
 
T

Tony Johansson

Hello!

Xml is used havily when dealing with DataSet. I know that Xml schema is used
by DataSet.
Xml schema is used to verify the structure of an Xml document.

So does this mean that a DataSet is using Xml document internally ?

//Tony
 
A

Alberto Poblacion

Tony Johansson said:
Xml is used havily when dealing with DataSet. I know that Xml schema is
used
by DataSet.
Xml schema is used to verify the structure of an Xml document.

So does this mean that a DataSet is using Xml document internally ?

I don't know how the DataSet is internally implemented. But you CAN view
its contents as an XML Document thanks to the XmlDataDocument class:

XmlDataDocument doc = new XmlDataDocument(myDataset);

XmlDataDocument is a child class of XmlDocument, so all the methods for
accessing XML through the DOM that are exposed by XmlDocument are also
available from the XmlDataDocument. You can view and modify your DataSet as
XML in this way.
 
A

Anthony Jones

Tony Johansson said:
Hello!

Xml is used havily when dealing with DataSet. I know that Xml schema is used
by DataSet.
Xml schema is used to verify the structure of an Xml document.

So does this mean that a DataSet is using Xml document internally ?

The fact that is doesn't support IXPathNavigable but does support
IXmlSerializable would indicate that it doesn't use an Xml Document
internally. This makes sense since in many circumstances where DataTables
are filled by Adapters that access data in a fairly raw manner (such as SQL
Servers TDS stream) bloating all this with an Xml based store when there is
not even a hint that it will ever be needed as XML would be a bit daft.
 
T

Tony Johansson

Hello!

I know that in some cases are there Xml schema that define the structure for
the DataSet.
Structure means here I assume DataTable, DataRelations and so on.

What is the advantage to have Xml schema to define the DataSet ?

//Tony


"Ignacio Machin ( .NET/ C# MVP )" <[email protected]> skrev i
meddelandet
Hello!

Xml is used havily when dealing with DataSet. I know that Xml schema is used
by DataSet.
Xml schema is used to verify the structure of an Xml document.

So does this mean that a DataSet is using Xml document internally ?

//Tony

no

The data is stored in collection classes, not in a XML structure. The
XML is used to load/save it
 
I

Ignacio Machin ( .NET/ C# MVP )

Hello!

I know that in some cases are there Xml schema that define the structure for
the DataSet.
Structure means here I assume DataTable, DataRelations and so on.

What is the advantage to have Xml schema to define the DataSet ?

It's an standard form of describe the data that is stored using .NET
classes like DataRow, DataTable, etc. You can see it as a
representation of the internal structure of the dataset that can be
understood and transformed/consumed by any program that knows how to
parse XML
 

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