DataSet - Custom XML Serialization

J

Just D.

All,

What is the simplest way to XML serialize only required columns from the
DataSet without transforming it or copying data from it? Is it possible to
set what columns should be serialized and what should not? I'm talking about
Tables[0] only. Maybe there is a simple way to bind a XML DataSet Schema and
use it to filter/skip extra data from the XML string?

Just D.
 
C

Cor Ligthert[MVP]

That is what somebody find simple or is used too.

I simply would create a new dataset and insert in that a new datatable that
I have created with DataView(ToTable,x,x) and then write it with
ds.WriteXML(path)

Be aware that there is beside as it is serializing seldom something real
copied in Net beside the references.

Cor
 
J

Just D.

Thanks! I knew about this way, but I wanted to get it easier since I have
the schema that hopefully could be used. Maybe I'm wrong or at least it's
not documented by Microsoft. I'll wait for a while then try to do that
manually.

Just D.

Cor Ligthert said:
That is what somebody find simple or is used too.

I simply would create a new dataset and insert in that a new datatable
that I have created with DataView(ToTable,x,x) and then write it with
ds.WriteXML(path)

Be aware that there is beside as it is serializing seldom something real
copied in Net beside the references.

Cor
What is the simplest way to XML serialize only required columns from the
DataSet without transforming it or copying data from it? Is it possible
to set what columns should be serialized and what should not? I'm talking
about Tables[0] only. Maybe there is a simple way to bind a XML DataSet
Schema and use it to filter/skip extra data from the XML string?
 

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