xpath with xml ajax
xpath with xml ajax
I am tring to retrieve a specific event from my xml document
this is the code i am using:
-
$.ajax({
type: "GET",
url: "../files/events.xml",
dataType: "xml",
aSync:true,
success: function(xml) {
$(xml).find("event[datestart='10/13/2008']").each( function() {
...
});
}
});
the xml looks like this
-
<events>
<event id="102">
<datestart>10/13/2008</datestart>
<dateend>10/14/2008 </dateend>
<title>Exl Pharma - Pharmaceutical Sampling Strategies</title>
<location>Philadelphia, PA</location>
<link>http://www.exlpharma.com/eventDetail.php?id=140</link>
<description/>
</event>
</events>
I want to return just the event that has datestart 10/13/2008.
There are other events in the xml i just wanted to simplify it for posting.
What is wrong with my code?
thanks
Todd