Look up the XPath Visualizer -- has versions for IE and for Mozilla/Firefox
This is a tool I wrote in 2000. Since then it has had many thousands of downloads and there hasn't been even a single unhappy user.
Warning: topxml.com has a trojan -- don't click on the above links unless you have a good malware protector.
Here are some screenshots from the tool, showing:
The inline- hilighting of the selected nodes
Evaluating every possible XPath expression, not only those that select nodes.
Defining and using variables in the XPath expressions.
Remembering all used XPath expressions.
Defining and using XSLT keys.