Guess I should have read all of the posts before replying initially, but now you get 2 in a row from me=). In regards to preventing accidents, I'm assuming your website is using user logins? If so, that's your accident proof right there. Every user gets a current build file associated with their login. When they first create a handle, everything resets to a default state, and when they decide to create a new build, everything resets to default. As they edit their character, every change gets saved automatically. You mentioned that you were using PHP, so this is a very simple implementation. Obviously, I don't know exactly how you are doing everything, but I'm guessing your question is "Ok, how do I make it save with every change because Java and PHP hate each other with a passion".
I was working on a website awhile back that I wanted to create the effect of frames in, without having that annoying problem of clicking "back" on the browser but it only going back frame by frame instead of to the previous website(left side/top of website static, middle dynamic when a link is clicked). In doing that, I figured out a way that allows Java and PHP to work together. On my website, when you click a link (java) it enters a switch statement which uses the case to determine which link was clicked. It then sets a string variable equal to the result of the file(PHP), and prints the result to the web page.
Couple Ideas:
1) If you want zero character sheet loss: Using the same idea, every time a change happens in Java (the character generation), the result gets saved into PHP. This obviously isn't the most effient way in the world, because that's alot of saving to do if every change is going to access the server side harddrive and write to it -- Not to mention if a million people are doing it at once. I think the best option would be to save the information client side, and have any information transfered back to the server every <x> seconds or when the window gets closed. Writing every change to the users own harddrive is nothing, and takes care of things such as power outtages. In the off chance the outtage hits while saving and the file gets corrupted, you have that server side backup to synchronize with when the user logs back in.
2) If you want minor loss and/or don't want to save anything client side: Same idea as above, but instead of saving at every little change, auto save <x> number of seconds (30, 60, whatever), when the user requests to save, when the user changes tabs, or when the user closes the window.
In regards to XML access with C++... Write a very basic database program to load the XML file using C++/SQL (Free). You now have your data. Manipulate it to your hearts content and change the format so you are all compatible with each other. Doing this in MFC will take about 5 minutes (Well, the loading part=) ), as installing SQL Server allows you to create an MFC template for database access.
Anyways, those are just my thoughts on how you might go about it. Hopefully they are worth considering. If not, at least you know what you don't want to do=)