求助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>
<!-- 站点路线 --&
相关问答:
DataSet导出xml 批处理(循环)得怎么处理
XML文件
<A>
<B>
<C>
</C>
&nb ......
我有一个类似的xml的 string,想通过遍历怎么个xml 输出我想要的element的值
xml 为:
<Discover xmlns="urn:schemas-microsoft-com:xml-analysis">
<RequestType>DISCOVER_XML_ME ......
现在有个xml文件是<?xml version="1.0"?>
<?mso-application progid="Excel.Sheet"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xm ......
功能说明:Java servlet 把XML数据压缩后发送到PB用户端,PB收到数据后解压出来.
传输要经过Base64编码.
问题是:能收到数据但是解压不出来.想请教大家或者有什么好的办法?
PB可以用"zlibwapi.DLL" 解压
......
求一本C#设计模式的书 ,我感觉我的代码运用接口,委托,属性的地方很少,肯定是我的设计模式太差了 ,有没有这方面,从国外翻译过来的,比较好的设计模式的书,推荐一下吧,非常感谢.
高人们说 代码重构的书好些,那我要改看 ......