handle also xml both in server and client