Is anyone familiar with basing a c# DataSet on an xml schema? As I understand it, you can create the DataSet object, then associate to an xml schema (.xls), then when the DataSet is loaded with the xml transaction it will have alll the xml elements in it.
My code to do this is giving the error:
"The schema namespace is invalid. Please use this one instead: http://www.w3.org/2001/XMLSchema.
at System.Data.DataSet.ReadXmlSchema(XmlReader reader, Boolean denyResolving)
at System.Data.DataSet.ReadXmlSchema(TextReader reader)
at postReturn.Page_Load(Object sender, EventArgs e)”
created the schema file from a very simple query export from Microsoft Access 2002 and I did edit this file to change the namespace from http://www.w3.org/2000/10/XMLSchema (given from the MS Access export) to http://www.w3.org/2001/XMLSchema (as suggested by the error message).
THere is the c# code to associate the DataSet to the schema:
string sch = Server.MapPath("mySchema.xls”);
System.IO.StreamReader myStreamReader = new System.IO.StreamReader(sch);
catch (Exception ex)
Response.Write("ERROR dataSet did not associate to schema: " + ex.ToString());
But, this did not help - I still get the same error message complaining about the namespace.
Much appreciation if someone can shed some light on this,