There's a tutorial on writing XPath expressions
in the manual. What you basically need to do is to identify how the chapter headings are presented in the XHTML and then write an expression that matches them.
Edit to add: If you've already tried, it might help if you presented a standard chapter heading from the book and the XPath expressions you tried and failed with.