I suggest you post this question in the Flash forums.
After Effects exports to the XFL format in a specific way, so that an After Effects composition is translated into a Flash authoring project, with many animation properties preserved. But that's the scope of XFL in After Effects for now.
I've manually unzipped an XFL file (they're really ZIP files) and replaced a couple of assets in the package and in the XML file, just to see if I could. It worked. It seems that you could write a script to do the same thing automatically.
As suggested, you will get better answers on the Flash forums. XFL is just a compressed XML derivative and it should be perfectly possible to mangle it in a million ways using scripting. Personally I probably wouldn't bother with editing the file itself, but rather implement some functions/ a class in Flash itself to replace the content in there, but I guess it realyl depends on what you're after....