refactor xml transport