load('xpath_corpus.xml'); $xp = new DOMXPath($doc); $expr = "//user[@name=" . nyx_xpath_escape($name) . "]"; return $xp->query($expr); }