if you are holding your data in text files or in database etc, in my opinion:
1- You can create a script to create xml dynamically up to your data, there are various ways to create xml strings and adding elements into them.
2- You can get your data and programmatically create panorama/hotspots/buttons or add panoramic pictures etc. I don't know action script much but even in javascript you can do it easily. I saw in some topics, people suggest action script because of performance benefits. Which way you feel comfortable you can choose.
To be honest krpano's api documentation is really good one and you can find whatever you want to do in it.
Edit: For example, let's say you have millions of hotspots and thousands of pictures. You don't have to set xml file for every picture, you just can get these data dynamically from your source (or write there dynamically) use them whenever you need and add them to panoramic views in programmatic way.
addHotspot(+variableNameHere+);
hotspot[+variableNameHere+].point[0].ath = variableAthHere..... etc. Code syntax might have flaws but in this way you will only write one function or so to save or load your panoroma data.
Edit2: in short you are not limited with xml files, you can also use krpano in programmatic way. Check this out:
http://krpano.com/docu/quickref/#top http://krpano.com/docu/actions/#top