typed dataset schema relating to xml file
-
Hello, VS 2008 I have typed dataset and have added a single data table named dsMissedCalls.xsd and dtMissedCalls. I would like to save some missed calls for my application. The table is very small not more than 10 rows. Example. dtMissedCalls(ID, Caller, DateAndTime) I have created a XML file, and I would like the xml file to have the schema of the typed dataset (dsMissedCalls.xsd). Before when I have been creating xml file. I would add a new xml file. Then click the "Create Schema" button. That would creaet the schema for the xml file. However, as I have created a typed dataset that already has a schema. The question is. How do I get my xml file to relate to that schema? So basically I have created a typed dataSet and would like to save added rows to the xml file. The code below works, but I want to xml to use the dataset schema. Many thanks for help with this confusing question,
DataRow row; row = ds.Tables[0].NewRow(); row["Caller"] = callersName; row["DateTime"] = DateTime.Now.ToShortDateString(); ds.Tables[0].Rows.Add(row); ds.WriteXml(missedCallsXML, XmlWriteMode.DiffGram);