需要帮助循环访问xml文件以查找特定的innerxml [英] Need help on looping throug a xml file to find a specific innerxml

查看:53
本文介绍了需要帮助循环访问xml文件以查找特定的innerxml的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好。


我需要遍历一个xml文件,找到一个特定的innerxml文本,然后

将内容添加到树视图中。


例如。如果我正在搜索的innerxml是item001,那么然后我想在< items>< / items>


中将

内容添加到我的树视图中。


< items>

< item> item001< / item>

< more_item> stuff< / more_item>

< / items>


任何想法如何做到这一点。


我必须承认我有很少的xml和treeview经验所以我希望你是

能够帮助或引导我参加考试。


谢谢


// Janhm

Hello.

I need to loop through a xml file finding a specific innerxml text and then
ad the content to a treeview.

For example. If the innerxml im searching for is "item001" then I want the
content in <items></items>

added to my treeview.

<items>
<item>item001</item>
<more_item>stuff</more_item>
</items>

Any ideas how to do that.

I must admit I have little xml and treeview experience so I hope you are
able to help or guide me to an examble.

Thanks

//Janhm

推荐答案

在消息< eb ********************** @ news.easynews.com> ,janhm

< no ****** @ this.adr>写道
In message <eb**********************@news.easynews.com>, janhm
<no******@this.adr> writes
你好。

我需要循环查找一个特定的innerxml文本的xml文件,然后将内容添加到树视图中。
Hello.

I need to loop through a xml file finding a specific innerxml text and then
ad the content to a treeview.




使用XPATH查询。查看

XmlDataDocument类的SelectNodes方法。


-

Steve Walker



Use an XPATH query. Look up the SelectNodes method of the
XmlDataDocument class.

--
Steve Walker


谢谢,看看..

// janhm

thanks, will have a look..
//janhm

使用XPATH查询。查找XmlDataDocument
类的SelectNodes方法。

- Steve Walker
Use an XPATH query. Look up the SelectNodes method of the XmlDataDocument
class.

--
Steve Walker



它似乎XPATH不支持,因为我正在为智能设备开发..


任何其他想法?

// Jan
It appears that XPATH isn''t supported, as im developing for a smart device..

any other ideas ?
//Jan

使用XPATH查询。查找XmlDataDocument
类的SelectNodes方法。

- Steve Walker

Use an XPATH query. Look up the SelectNodes method of the XmlDataDocument
class.

--
Steve Walker



这篇关于需要帮助循环访问xml文件以查找特定的innerxml的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆