Added xml write/read test function