dflow Posted June 29, 2011 Share Posted June 29, 2011 how would i query with xpath a specific node with city_id=2 //city_list <cities> <city> <city_name>Barcelona</city_name> <city_id>2</city_id> </city> <cities> $ch = curl_init("http://example.com/citylist.php?rt=".$rt.""); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HEADER, 0); $data = curl_exec($ch); curl_close($ch); $xmlcitylist = new SimpleXmlElement($data, LIBXML_NOCDATA); Link to comment https://forums.phpfreaks.com/topic/240689-xpath-and-curl/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.