fix xml write bug 0