利用用XPath
/FlashMenu/menuelement[1]/@info
等等
具体的看quickstart,我只是给出了XPath的写法
/FlashMenu/menuelement[1]/@info
等等
具体的看quickstart,我只是给出了XPath的写法
解决方案 »
- Nhibernate有关的问题。。在线等
- 为什么相加后得null呢? 相当有技术难度哦!!!
- 如何给button添加服务器方法
- 应邀赴宴,作为男人不会喝酒(或则因身体原因,医生不准喝酒)在酒席上怎样应酬新老朋友呢?
- 请问如何让小数点后带4位的数据在txtbox中完整显示出来
- 跪求 高手写代码
- 经典网站解决方案!同学们一起来学学!
- 新手,ActiveReports报表问题,好像是说纸张大小问题??
- 如何把一个字符串中的内容放到CheckBoxList中?
- Vb.net的InStr函数,C#里是什么?
- datatime要引用什么命名空间?
- <complilation>中的debug怎么用?debug=true和debug=false有什么区别?(@@@钱少,别见怪@@@)
doc.Load("c:\\test.xml");
XmlNodeList list = doc.DocumentElement.SelectNodes("menuelement");
foreach(XmlNode node in list)
{
MessageBox.Show(node.Attributes["open"].Value);
MessageBox.Show(node.Attributes["icon"].Value);
MessageBox.Show(node.Attributes["info"].Value);
}
MessageBox.Show(xl(0).InnerText);
<FlashMenu bgColor="0xC2C6A8" textColor="0x333333" icon="icons/winamp.swf" textSize="12" font="verdana" moveSpeed="2" lineHeight="1">
<menuelement open="0" icon="icons/playtwo.swf" hint="(FK)Groups" info=" 选择不同功能和界面的播放器">
<item open="0" icon="icons/playtwo.swf" info=" Winamp样式" listURL="asfunction:changePlayer,beta2Player.swf" targetWindow="_self" />
<item open="0" icon="icons/playtwo.swf" info=" 超酷样式" listURL="asfunction:changePlayer,MMD3Style2.swf" targetWindow="_self" />
</menuelement>
<menuelement open="1" icon="icons/playone.swf" info=" 播放清单" listname="boxall">
<menuelement open="1" icon="icons/res.swf" info=" 华语" listname="boxchina">
<menuelement open="1" icon="icons/res.swf" info=" 国语" listname="boxputong">
<item open="0" firstLoad="1" icon="icons/ser.swf" info=" 刘若英" listURL="asfunction:loadMusicList,musiclist/china/putong/ying.xml" targetWindow="_self" listname="listpageying" />
<item open="0" icon="icons/ser.swf" info=" 刘德华" listURL="asfunction:loadMusicList,musiclist/china/putong/hua.xml" targetWindow="_self" listname="listpagehua" />
</menuelement>
<menuelement open="0" icon="icons/res.swf" info=" 粤语" listname="boxgd"></menuelement>
<menuelement open="0" icon="icons/res.swf" info=" 其他" listname="boxorther"></menuelement>
</menuelement>
<menuelement open="0" icon="icons/res.swf" info=" 外语" listname="boxenglish"></menuelement>
</menuelement>
</FlashMenu>=============================================
这个xml我按你们的方法,但只读了"选择不同功能和界面的播放器" 和"播放清单"两个结点,结点内的目录就读不了了