fixed xml/json parsing