Re^2: XML::Lib XML question contains a discussion in case you need to include namespaces into the XPath query.
http://pgfearo.googlepages.com/ Sketchpath provides a great editor for XPath - you create a query by clicking on the desired node in the XML tree.