2

I am looking to select every event where the status is "Live"

I am using this in Drupal's XPath XML parser and have the Context base query and xpath queries fields.

(Context=This is the base query, all other queries will run in this context.)

I current have:

Context: ./event[./status = 'Live']

title: title

Description: description

<events>

<event>
 <title>Number 1</title>
 <status>Draft</status>
 <description></description>
</event>

<event>
 <title>Number 1</title>
 <status>Live</status>
 <description></description>
</event>

</events>
abatishchev
  • 98,240
  • 88
  • 296
  • 433
IamOnStage
  • 193
  • 2
  • 13
  • 1
    possible duplicate of [XPath to select element based on childs child value](http://stackoverflow.com/questions/9683054/xpath-to-select-element-based-on-childs-child-value) – abatishchev Aug 07 '15 at 05:42

1 Answers1

3

I don't know drupal but this XPath worked fine for me in XPath tester :

./events/event[ status = 'Live']
har07
  • 88,338
  • 12
  • 84
  • 137