Cannot iterate the contents of your XAP file. You just need to save the list of assets that you want to load.
I had a similar problem with my application, in the end I wrote a simple script that looked in a specific folder for the corresponding file name template and update the text file. So, I ran the script before creating the application, the text file will be packed and read in the application to determine which files can be downloaded. Or you can skip the problem and save the list in code manually.
source share