读取XML文件中的选定标签 [英] Read selected tags in XML File

查看:97
本文介绍了读取XML文件中的选定标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


在我的XML文件"中,假设其包含元素
路径和状态

现在,我想读取状态为0或1的所有节点
我该如何阅读

Hi
In My XML File suppose its Contains element
path and status

Now i want to read all the node whose status are 0 or 1
how can i read

推荐答案

如果您难以理解如何执行此操作,则应该在CP上阅读此文章.它较旧(适用于.NET 1.1),但它可能使您了解如何完成此作业.
面向初学者和专家的XML [
If you are having difficulty understanding how to do this, you should read this article here on CP. It is older (for .NET 1.1), but it may give you the understanding of how to do this bit of homework.
XML for beginners and experts[^]


dv = new DataView(ds.Tables [0],
                       "Status IN (0,2)",
                       "strpath asc",
                       DataViewRowState.CurrentRows);


这篇关于读取XML文件中的选定标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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