in reply to Help with XPath

Since there's no module called XPath, and it might make a difference, you'll need to narrow down which of the many XPath modules you're using. And, do you perhaps have troubles with namespaces here? I know XPath is really ugly about namespaces.