fix read/write xml bug1