Android app that reads in xml files and saves preferences following code from Professional Andorid 4 Applications