added correct xml parse function