You are reseting the value of name/age/balance instead of inserting the data within. thus you remove the original value. You should have used appendChild instead of =.
function saveData(e:Event):void
{
var fileRef:FileReference=new FileReference()
var userData:XML=new XML(<UserData/>)
for(var i:int=0;i<userArr.length;i++) //userArr is the array holding all the users
{
var user:XML=new XML(<User/>)
var name:XML=new XML(<Name/>)
var age:XML=new XML(<Age/>)
var balance:XML=new XML(<Balance/>)
name.appendChild(userArr[i].name) //the userArr holds a class with the variables name, age and balance.
age.appendChild(userArr[i].age)
balance.appendChild(userArr[i].balance)
//I'm pretty sure that its here it goes wrong.
//fore some reason when I appendChild the user, it gets <> but when I
//appendChild name, age and balance it does not get a <>.
user.appendChild(name)
user.appendChild(age)
user.appendChild(balance)
userData.appendChild(user)
}
fileRef.save(userData,"Data.xml")
}