Xml xpath基于子值选择父项
我希望选择状态为“Live”的每个事件 我在Drupal的XPathXML解析器中使用它,并具有基于上下文的查询和XPath查询字段 (Context=这是基本查询,所有其他查询都将在此上下文中运行。) 我目前有: 上下文:Xml xpath基于子值选择父项,xml,xpath,Xml,Xpath,我希望选择状态为“Live”的每个事件 我在Drupal的XPathXML解析器中使用它,并具有基于上下文的查询和XPath查询字段 (Context=这是基本查询,所有其他查询都将在此上下文中运行。) 我目前有: 上下文:/event[./status='Live'] 标题:title 说明:说明 <events> <event> <title>Number 1</title> <status>Draft</status&
/event[./status='Live']
标题:title
说明:说明
<events>
<event>
<title>Number 1</title>
<status>Draft</status>
<description></description>
</event>
<event>
<title>Number 1</title>
<status>Live</status>
<description></description>
</event>
</events>
第一
草稿
第一
居住
我不知道drupal,但这个XPath在XPath tester中运行良好:
./events/event[ status = 'Live']
可能重复的