易截截图软件、单文件、免安装、纯绿色、仅160KB

求助xml的读取问题 - .NET技术 / C#

我想建一个数组strs保存来自XMLFile1.xml的相关数据。数组最后是用来给combobox选择用的
 这是我用来模糊查询用的: XmlDataDocument _xmlData = null;
  XmlNodeList _xmlNodeList = null;

  try
  {
  string xmlFile = Application.StartupPath + "\\XMLFile1.xml";
  _xmlData = new XmlDataDocument();
  _xmlData.Load(xmlFile);
  string xpath = "//lines";

  if (textBox1.Text != "")
  {
  xpath += "[contains(name,'{0}')]";
  xpath = String.Format(xpath, this.textBox1.Text);
  }
这是关联combobox的代码:
  if (this.comboBox1.Text == "aaa")
  {
  this.comboBox2.Items.Clear();
  comboBox2.Items.Add("选择");
  string[] temp =strs[0].Split(',');
  for (int i = 0; i < temp.Length; i++)
  comboBox2.Items.Add(temp[i]);
  }
XMLFile1.xml如下:
<?xml version="1.0" encoding="utf-8" ?> 
 <bus>
  
  <linestops>
  <!-- 站点路线 --&


相关问答:

C# DataSet导出xml 批处理(循环)得怎么处理

DataSet导出xml 批处理(循环)得怎么处理
XML文件
<A>
      <B>
        <C>
        </C>
  &nb ......

vb读取xml - VB / 基础类

现在有个xml文件是<?xml version="1.0"?>
<?mso-application progid="Excel.Sheet"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
 xm ......

VC中xml遍历 - VC/MFC / ATL/ActiveX/COM

如何用ATL窗体应用程序中用System.Xml遍历一个Xml文件
你说的是托管代码?


vc可用msxml
http://msdn.microsoft.com/en-us/library/ms767594(VS.85).aspx

MSXML4  
  //引入msxml4.dll &nbs ......

Document解析xml遇到的问题~~ - 移动平台 / Android

XML文件内容:
- <ResList>
  <page>0</page> 
- <resItem>
  <resName>WWW</resName> 
  </resItem>
- <resItem>
&nb ......

求一本C#设计模式的书 - .NET技术 / C#

求一本C#设计模式的书 ,我感觉我的代码运用接口,委托,属性的地方很少,肯定是我的设计模式太差了 ,有没有这方面,从国外翻译过来的,比较好的设计模式的书,推荐一下吧,非常感谢.
高人们说 代码重构的书好些,那我要改看 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号