Provided are isolated polypeptides having xylanase activity, catalytic domains and cellulose binding domains, and polynucleotides encoding the polypeptides, catalytic domains or cellulose binding domains. Also provided are nucleic acid constructs, vectors and host cells comprising the polynucleotides as well as methods of producing and using the polypeptides, catalytic domains or cellulose binding domains.