M
michael sorens
I want to populate a DataGridView from an XML data set, but from an
XmlDocument rather than from a file:
XmlDocument doc = new XmlDocument();
// populate 'doc' here...
DataSet ds = new DataSet();
// what do I use here?
//ds.ReadXml("file.xml");
dataGridView.DataSource = ds;
There is no DataSet.ReadXml that takes an XmlDocument, and I cannot seem
to see a clear path between Streams, XmlReaders, TextReaders, etc. to
navigate from the XmlDocument to the DataSet. Suggestions?
XmlDocument rather than from a file:
XmlDocument doc = new XmlDocument();
// populate 'doc' here...
DataSet ds = new DataSet();
// what do I use here?
//ds.ReadXml("file.xml");
dataGridView.DataSource = ds;
There is no DataSet.ReadXml that takes an XmlDocument, and I cannot seem
to see a clear path between Streams, XmlReaders, TextReaders, etc. to
navigate from the XmlDocument to the DataSet. Suggestions?