Load XML file

xiaoxiao2021-04-01  222

// Open XML file

FILESTREAM FS = New FileStream (Server.MAppath ("XML.XML"), FileMode.Open, FileAccess.Read;

// Additional streamReader

StreamReader Rder = New StreamReader (FS);

//From

StreamReader

Read

Xml

data

DataSet DS = New DataSet ();

DS.Readxml (Rder);

//will

Xml

Data binding

Dataset

DataView mysource = new dataview (ds.tables [0]);

DataGrid1.datasource = mysource;

DataGrid1.databind ();

转载请注明原文地址:https://www.9cbs.com/read-131102.html

New Post(0)