I recently received a query from someone working their way through the PhoneGap Mobile Application Development Cookbook recipes, and this query was an issue relating to the included xui.js JavaScript files in the project code.
There is a possibility that the file lost formatting or became corrupt during the export / synchronization processes throughout writing the book. If this is an issue you are facing, the best option is to download a fresh copy of the xui.js library.
At the time of writing this, however, the download links on the XUI official site no longer seem to work. The source code is still in place at the Github repository, but you will need to compile it into usable JavaScript code yourself. The instructions for this are included on the Github project page, but to make it easier I have generated the compiled build and offer it here as a download. This .zip file contains full and compressed versions of the library for standard, BlackBerry and IE (version2.3.2), and also contains the generated documentation files. This is the latest version at the time of writing this post.
Download the xui.js .zip file.
If you have experienced any issues with the xui.js files when working through the recipes in the book, my sincere apologies to you.