Hey , This is a small test for a script im trying to make  
 
function valTest(source)
    local StatsFile = xmlLoadFile ( "stats.xml" )
    local nick = getPlayerName(source)
    local node1 = xmlFindChild ( StatsFile, "Player"..nick,0 )
    local statsNode = xmlNodeGetAttribute(node1, "level")
    local oldlvl= xmlNodeGetAttribute(node1, "oldlevel")
    local old = xmlNodeSetAttribute ( node1 ,"oldlevel", statsNode )
 outputChatBox(oldlvl)
end
 
What im trying to do is store the level of the player as oldlvl so i can compare the new level he will get later on in the script 
Everything sets perfectly in the xml file ,The only thing is that when i output oldlvl in the chatbox , even though in the xml file it says oldlvl="3" it will output the same value statsNode has 
any ideas? 
GuNNeR