我刚刚使用此代码从XML文件读取XML数据。它成功从file.I读取数据。我只是想知道如何从XML读取SelectSingleNode数据数据集。如何从C#中的DATASET对象读取xml数据
public DataSet ds =new DataSet();
public FileStream stream = null;
stream = new FileStream(schdlpath, FileMode.Open);
ds.ReadXml(stream);
//after this even if i delete the xml file it won't hamper the appliaction.
stream.Close();
//this way I can print all the data..
Console.WriteLine(ds.GetXml());
所有我想要的是读取数据 这样
public XmlDocument document = new XmlDocument();
XmlNode ht = document.DocumentElement.SelectSingleNode("/Schedule/AudioVedioPlayer/Height");
其实我想读取XML数据,并将其存储到一个变量。
thnx4 help,bt我可以从数据集中读取数据... ?? – kaushik
编辑为直接从DataSet中读取。 –
THnxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ...刚刚应用于演示应用程序。正在添加到大one.wish我的运气.... n也sorrry f我的thnx似乎对你来说很小......我真的意味着它的大方式。 – kaushik