The following Firefox Add-on's will help you use Selenium, particularly when it comes to XPath Locators:
* XPath Checker - suggests XPath and can be used to test the XPath you write.
* Firebug - XPath suggestions are just one of the many powerful features of this very useful add-on. You can inspect elements to view the HTML code for that element.