decode xml for comparison