Former SNP leader Alex Salmond said he was "glad to have won" the case "and sad that it was necessary to take this action".