raydenxxx Posted March 14, 2008 Report Share Posted March 14, 2008 Hello, I'm searching how to load a dataset from a xml file...I found the Load function for a System.data.dataset but no doc to explain how to use it... In the doc I found how to create a dataset by connecting to the database but I don't want to do that. Is it possible to directly load a xml file containing a dataset? (with the schema) Thanks,Raydenxxx Quote Link to comment Share on other sites More sharing options...
raydenxxx Posted March 17, 2008 Author Report Share Posted March 17, 2008 I find how to... DataSet dataSet = new DataSet(); string dataPath = Path.Combine(Server.MapPath("App_Data"), "SupportServeur.xml"); //on lit le schema dataSet.ReadXml(dataPath, XmlReadMode.ReadSchema); //On prend un graph en bar Chart1.Gallery = Gallery.Bar; //on rempli le chart Chart1.DataSourceSettings.Fields.Add(new FieldMap("LibelleDomaine", FieldUsage.Label)); Chart1.DataSourceSettings.Fields.Add(new FieldMap("NbDossiers", FieldUsage.Value)); Chart1.DataSourceSettings.DataSource = dataSet.Tables[1]; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.