public function query($query)
{
//convert each query to real XPath: (multiple targets are available by comma separating queries)
$xpath = implode('|', array_map(array('self', 'shorthand2xpath'), explode(', ', $query)));
//run the real XPath query and return the DOMNodeList result
if ($result = @$this->DOMXPath->query($xpath, $this->DOMNode)) {
return $result;
} else {
throw new Exception("Invalid XPath Expression: {$xpath}");
}
}