Added xml handling