try
{
string svla1 = string.Empty;
string svla2 = string.Empty;
XmlDocument mXml = new XmlDocument();
mXml.Load(this._FilePath);
XmlNode xnode = mXml.SelectSingleNode("//person");
foreach (XmlNode xno in xnode.ChildNodes)
{
if (xno.Name == "name")
{
svla1 = xno.Name;
}
else if ( xno.Name == "title")
{
svla2 = xno.age;
}
}
}
catch (Exception ex)
{
throw ex;
}字符串都取出来了 然后添加至combobox……
{
string svla1 = string.Empty;
string svla2 = string.Empty;
XmlDocument mXml = new XmlDocument();
mXml.Load(this._FilePath);
XmlNode xnode = mXml.SelectSingleNode("//person");
foreach (XmlNode xno in xnode.ChildNodes)
{
if (xno.Name == "name")
{
svla1 = xno.Name;
}
else if ( xno.Name == "title")
{
svla2 = xno.age;
}
}
}
catch (Exception ex)
{
throw ex;
}字符串都取出来了 然后添加至combobox……
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货