I have this XML:

<?xml version="1.0" encoding="UTF-8"?>
<dataroot xmlns:od="urn:schemas-microsoft-com:officedata"
generated="2009-11-04T16:45:18">
<Week>
<weekID>111</weekID>
<weekDuration>2009-03-02 - 2009-03-08</weekDuration>
<dateStamp>2009-03-08T00:00:00</dateStamp>
</Week>
<Week>
<weekID>113</weekID>
<weekDuration>2009-02-16 - 2009-02-22</weekDuration>
<dateStamp>2009-02-22T00:00:00</dateStamp>
</Week>
.
.
.


I want to parse out the Week element with the weekID of 111.
I'm using Hpricot and this but I can't find it. What's the xpath?
doc.search('//Week[weekID=111]')
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to