Carbohydrates from bacteria, in particular polysaccharides constituting bacterial capsules, have been used to develop vaccines against pathogens. Traditionally, these vaccines are made from polysaccharides isolated from natural sources. As an alternative, vaccines based on synthetic oligosaccharides offer the possibility of rationally designing new vaccines or improve the existing ones. Having access to amounts of highly-pure and well-characterized oligosaccharides is fundamental for performing studies aimed at understanding the structures of minimal sugar epitopes with immunogenic potential. The main objective of this work is the development of synthetic routes to obtain oligosaccharides representing sequences of capsular polysaccharides (CPSs) from pathogenic bacteria to elucidate minimal epitopes of antibodies. The aim was achieved via a combination of synthetic chemical methods and employed both solution-phase and automated solid-phase techniques. The ultimate goal was to design synthetic carbohydrate antigens useful for developing new semi-synthetic glycoconjugate vaccines for human or animal use. The first part of this dissertation describes the synthesis of five fragments related to the CPS of the pig pathogen Streptococcus suis serotype 2 using solution phase chemistry. Starting from the synthesis of seven monosaccharide building blocks bearing appropriate protecting groups, a series of chemical glycosylations and successive protecting group manipulations gave access to the target compounds. The obtained library was used to create glycan microarrays to evaluate binding specificities of antibodies contained in samples of sera from pigs infected with Streptococcus suis type 2. The second part describes the use of a combination of automated solid-phase synthesis and enzymatic glycosylations to synthesize three fragments related to the CPS of Streptococcus suis serotype 14. These glycans will be evaluated in glycan microarrays experiments as described above.