title: Scrapy: traversing a document
body: <p>This a mock-up of part of a document I'm working with. What I'm trying to do is first find the Time and Cost  elements, and from there find their respective values. I've tried various axis selectors but haven't got anywhere. I don't to go directly to the Time and Cost elements, I need to find them in relation to their associated h4s.</p>
  
  <pre><code>&lt;ul class="events"&gt;
    &lt;li id="event-123456" class=eventItem&gt;
      &lt;div class="details"&gt;                
        &lt;h4&gt;Time&lt;/h4&gt;
        &lt;div&gt;
          &lt;p&gt;17:00&lt;/p&gt;
        &lt;/div&gt;
        &lt;h4&gt;Cost&lt;/h4&gt;
        &lt;div&gt;
        &lt;p&gt;10.00&lt;/p&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/li&gt;
    &lt;li id="event-678901" class=eventItem&gt;
      &lt;div class="details"&gt;                
        &lt;h4&gt;Time&lt;/h4&gt;
        &lt;div&gt;
          &lt;p&gt;21:00&lt;/p&gt;
        &lt;/div&gt;
        &lt;h4&gt;Cost&lt;/h4&gt;
        &lt;div&gt;
        &lt;p&gt;20.00&lt;/p&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>This is the skeleton of the parser</p>
  
  <pre><code>def parse(self, response):
          Events = response.xpath('//ul')
          for event in Events:
              item['cost'] = event.xpath(???)
              item['time'] = event.xpath(???)
  </code></pre>