12-10-2007, 07:22
|
|
|
חבר מתאריך: 18.01.05
הודעות: 180
|
|
כעיקרון השיטה שמוכרת לי היא דרך dataset. ע"מ לטעום קובץ XML לds:
System.IO.FileStream fsReadXml = new System.IO.FileStream
(myXMLfile, System.IO.FileMode.Open);
ds.ReadXml(fsReadXml);
dataGrid1.DataSource = ds;
dataGrid1.DataBind();
//Label1.Text= ds.Tables[0].Rows[0][0].ToString();
dataGrid1.DataMember = "Sells";
ועל מנת לטעון קובץ XML מהds:
DataSet ds = new DataSet();
// fill dataset
da.Fill(ds, "Sells");
// write dataset contents to an xml file by calling WriteXml method
ds.WriteXml("D:\\OutputXML.xml");
בהצלחה!
|