enhanced xml handling