hi,
I have the same question.
There are a million ways of doing that. The first thing you have to ask yourself is "what methods do I know that will write the file format that I want where I want it".
If the answer is "I don't have any method", then the problem is not something KRpano related.
I'd suggest you look at XML js dom's and schemes or try PHP to store XML. If you got a WYSIWYG interface, you are nearly halfway there.