Doing an "exact match" search is quite easy. A more fuzzy search, for example one in which multiple spaces or newlines are considered equivalent to a single space, on in which the text can span element boundaries, requires rather more care.
You don't say what output you want from your search. If it's a simple yes/no answer, then contains(/, "xml is cool") does the job. If you want to return the element(s) in which the text is contained, try //*[contains(., 'xml is cool')
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference