I have two similar nodes in an XML file. When using a CONTAINS query via XPATH, the XPATH query returns two sets of data. I would like it to only return the exact match. Any idea if this is possible?
Here is my code:
$uc = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
$lc = "abcdefghijklmnopqrstuvwxyz" ;
$lats = $users->xpath("/users/user[contains(translate(ID, '$uc', '$lc'), translate('$test', '$uc', '$lc'))]/lat");
$lons = $users->xpath("/users/user[contains(translate(ID, '$uc', '$lc') ,translate('$test', '$uc', '$lc'))]/lon");
Where $test = "NY:3036N-B"
XML file contains NY:3036N-B and NY:3036N-B2
Thanks in advance,
M