We present new sets of fragmentation functions in next-to-leading order QCD that are determined from e+e- annihilation data of inclusive particle production. In addition to the O(alpha_s) unpolarized cross section the longitudinal cross section is also used to extract the gluon fragmentation function from e+e- annihilation data. As the O(alpha_s) vanishes for longitudinal polarized photons (or Z bosons), the O(alpha_s^2) corrections are required to reduce the scale ambiguities. Recently, P.J. Rijken and W.L. van Neerven presented the longitudinal coefficient functions to next-to-leading order. We confirm part of their results in this thesis and complete the calculation by the results for the color class C_F*T_R that must be included for a consistent comparison with LEP1 data. The complete set of coefficient functions is then used together with novel data from ALEPH to determine the fragmentation functions for charged hadrons. This set, and also sets for charged pions, kaons, and D^* mesons as well as neutral kaons published previously, can then be employed to test QCD in e+e- annihilation, photoproduction, gamma-gamma collisions, p-p_bar scattering and DIS. Finally, we suggest how the improved knowledge on the fragmentation in particular of the gluon could be used to determine the gluon and charm content of the photon.