Have I actually managed to modify XML?

We have a sort of game where buttons are clicked in order to make choices. A number of buttons are available. When a button is clicked it registers a “1” in a textfield. If it is not clicked or later unclicked the textfield reads “0”.

When the player is finished, the player clicks a “Submit” button and I would like to transfer all the “0” and “1” textfield values to their corresponding elements in an xml file I’ve already linked to. From there the values will be added to a database where they can be saved.

I think I’ve figured this out, but I’m not sure. When I trace the xml file after I’ve clicked some buttons, the trace of the xml file registers the clicks. Have I in fact managed to modify the xml file or is it some kind of tracing illusion? It seems impossible that it’s this simple. Any thoughts?

var currentDataCategories:String="Categories.xml";
var xmlLoaderCategories:URLLoader=new URLLoader();
var xmlCategoriesRequest:URLRequest=new URLRequest(currentDataCategories)
var xmlCategories:XML=new XML();
xmlLoaderCategories.addEventListener(Event.COMPLETE,loadCategoriesXML);
xmlLoaderCategories.load(xmlCategoriesRequest);

function loadCategoriesXML(evt:Event):void {
    xmlCategories=new XML(evt.target.data);
    //ParseCategories(xmlCategories);
    parseSubmit(xmlCategories);
}
function parseSubmit(xmlCategoriesOutput:XML):void {
    function submitChoices(evt:MouseEvent):void {
        xmlCategoriesOutput.hits[0].hits=txtWelfare.text;
        xmlCategoriesOutput.hits[1].hits=txtWelfareAlt.text;
        xmlCategoriesOutput.hits[2].hits=txtMediCal.text;
        xmlCategoriesOutput.hits[3].hits=txtMediCalAlt.text;
        xmlCategoriesOutput.hits[4].hits=txtHealthyFamilies.text;
        xmlCategoriesOutput.hits[5].hits=txtSSISSP.text;
        xmlCategoriesOutput.hits[6].hits=txtInHomeCare.text;
        xmlCategoriesOutput.hits[7].hits=txtInHomeCareAlt.text;
        xmlCategoriesOutput.hits[8].hits=txtDevelopmentalServices.text;
        xmlCategoriesOutput.hits[9].hits=txtDevelopmentalServicesAlt.text;
        xmlCategoriesOutput.hits[10].hits=txtChildCare.text;
        xmlCategoriesOutput.hits[11].hits=txtChildCareAlt.text;
        xmlCategoriesOutput.hits[12].hits=txtFirstFive.text;
        xmlCategoriesOutput.hits[13].hits=txtMentalHealth.text;
        xmlCategoriesOutput.hits[14].hits=txtMentalHealthAlt.text;
}
btnSubmit.addEventListener(MouseEvent.CLICK,submitChoices);
}