xml parser write in pure lua