massage xml output to match input more closely