读取XML
时间:2011-03-25 来源:青瓷
XmlDocument xd = new XmlDocument();
xd.Load("XML文件路径");
XmlElement xe = xd["root"];
XmlElement xeUpLoadResult = xe["Result"];
for (int i = 0; i < xeUpLoadResult.ChildNodes.Count; i++)
{
XmlAttribute _barId = xeUpLoadResult.ChildNodes[i].Attributes["id"];
XmlAttribute _barUpLoad = xeUpLoadResult.ChildNodes[i].Attributes["size"];
string barId = _barId.Value;
string barUpLoad = _barUpLoad.Value;
}
相关阅读 更多 +