The present invention relates to isolated polypeptides having α-L-galactosidase activity, catalytic domains and poly-nucleotides encoding the polypeptides andcatalytic domains. The invention also relates to nucleic acid constructs, vectors, and host cells comprising the polynucleotides as well as methods of producing and using the polypeptides, catalytic domains. The α-L-galactosidase can release L-galactose from corn fibers and corn xylan.