Added URLError exception handling. Changed xml structure.