Here's a way to do it:
(1) get the filter values from the form and build a querystring for xpath:
$fields = array( // fieldname => value for "all"
'photographer_id' => '',
'photographer' => 'x',
'image' => '0');
foreach ($fields as $fieldname => $fieldvalue)
if (isset($_GET[$fieldname]) && trim($_GET[$fieldname]) != $fieldvalue)
$query[] = "$fieldname = '$_GET[$fieldname]'";
if (isset($query))
$query = "[" . implode(' or ', $query) . "]"; else $query = "";
(2) use xpath to filter XML and display selected nodes
$xml = simplexml_load_string($x); // assume XML in $x
$results = $xml->xpath("area$query");
foreach ($results as $result)
echo "image $result->image by $result->photographer ($result->photographer_id)
";
see it working: http://codepad.viper-7.com/ciboJg