DataTable WriteXml is in consistent

G

Guest

The DataTable WriteXml produces different xml based on whether the table is
part of a dataset or not.
This means that anybody consuming the xml has to read it differently because
it ends up with different root nodes based on the circumstances.
Is there a way to prevent this?

This is VERY annoying.
 
G

Guest

That is what we were doing prior to .NET 2.0. The WriteXml method being
added to the datatable was a bonus for us because we thought we were going to
be able to eliminate that overhead of the merge.

I don't usually gripe but this was a very bad decision by the design team it
should be consistent.
 
M

Mateus Padovani Velloso

What about instancing a new dataset and using the merge method to import
only the table you want to export, and then exporting to xml?
 
M

Mateus Padovani Velloso

Well, and what if you convert DataSet to a xmlDocument and then extract only
the relevant node? I guess it could offer a better performance..
 

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