This sounds very similar to
a project I've been working on that spiders webpages, extracts links, and packs them up into a file for installation and viewing on a Palm® handheld. Feel free to grab my code as a starting point, and get back to me with your updates/fixes/etc. Perhaps we can work together to help meet both of our goals.