I have spent about half a day searching for an answer to this question and am slowly becoming frustrated. I am working with a Web service that returns an XmlNode as its response. I would like to be able to take the XML data reference by the node and view it with a data grid view. Does any one know if this is possible?
I am using the following code:
// submit command to webserver
XmlNode response = SubmitToWebserv((XmlElement)IssueNode, state.Get);
// create XML reader to read response
XmlReader reader = new XmlNodeReader(response);
// create a data table to hold response
DataTable dt = new DataTable();
dt.ReadXmlSchema(reader);
// read data into data table
dt.ReadXml(reader);
It throws exception: DataTable does not support schema inference from Xml. The thing is, the schema is included in the XML referenced by response... So I am at a loss.