rossmurphy Posted February 10, 2010 Share Posted February 10, 2010 Trying to retrieve the value of medal where pattern_name=X. I have tried like this: $row = $apicall->xpath('row[@pattern_name="Curling"]@medal'); <row last_win_date="1265326562133" medal="G" pattern_name="Cross Country" user_alias="Player1" user_id="WFG120"/> <row last_win_date="1265356801650" medal="G" pattern_name="Alpine" user_alias="Player1" user_id="WFG120"/> <row last_win_date="1265354641707" medal="G" pattern_name="Any 2 Lines" user_alias="Player1" user_id="WFG120"/> Anyone know how to do this? Link to comment https://forums.phpfreaks.com/topic/191673-xpath-query/ Share on other sites More sharing options...
Maq Posted February 10, 2010 Share Posted February 10, 2010 I believe you're missing a back slash before the medal attribute. Try: row[@pattern_name="Curling"]/@medal It would also be nice to give us more information. Such as errors, unexpected results, what you expect, etc... Link to comment https://forums.phpfreaks.com/topic/191673-xpath-query/#findComment-1010333 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.