However, now that I've learned about HTC's use of a category in 2.5, I feel this could well be your primary vessel for "backing up" the favorites. Instead of writing the info to an XML file, you could simply "emulate" 2.5 behaviour:
* Backup would set the HTCFavorite category on all contacts which are favorites.
* Restore would turn all contacts in the HTCFavorite category into favorites.
Your current method writes a lot of info into the XML - what if the contact's info has changed between the backup and restore? Will the restored favorite have the new info (from Outlook/Exchange) or the old backed up info?
BTW, I'd love it if your tool could operate silently from the "command line" - then I wouldn't have to wrestle with Mortscript to automate the process in SASHIMI.