xPath查询 [英] xPath query

查看:69
本文介绍了xPath查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试根据两个属性的值选择一个元素。在

Xml文档中,我需要查看属性minVal和maxVal。如果我在xPath中传入的值是$ gre $而不是min"和小于最大值,我会想要

来提取该元素的所有属性。


xPath可以实现吗?我能够轻松查询1个属性,但不能查询
两个。


谢谢


TR

解决方案




TR写道:

我是' m尝试基于两个属性的值选择元素。在
Xml doc中,我需要查看属性minVal和maxVal。如果我在xPath中传入的值大于min而不是和小于
max,我想要拉出该元素的所有属性。




//元素


< blockquote> value> @minValue和


value< @maxValue] / @ *


-


Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/


I''m trying the select a element based on values of two attributes. In the
Xml doc i need to look at an attribute minVal and maxVal. if the Value I''m
passing in in the xPath is greate than min "and" less than max, I''ll want
to pull all the attributes of that element.

Is this possible with xPath? I''m able to easily query 1 attribute, but not
two.

Thanks

TR

解决方案



TR wrote:

I''m trying the select a element based on values of two attributes. In
the Xml doc i need to look at an attribute minVal and maxVal. if the
Value I''m passing in in the xPath is greate than min "and" less than
max, I''ll want to pull all the attributes of that element.



//element


value > @minValue and


value < @maxValue]/@*

--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/


这篇关于xPath查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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