Reduces D-xylose into xylitol. Preferentially utilizes NADPH as a cosubstrate. NAD(+) + xylitol = D-xylose + H(+) + NADH NADP(+) + xylitol = D-xylose + H(+) + NADPH Mutations at positions 272 to 274 modify the cofactor specificity and increase specificity for NADH over NADPH. Carbohydrate metabolism; D-xylose degradation. The Lys-Ser-Asn motif at positions 272 to 274 is important for the cofactor specificity for NADPH over NADH. Belongs to the aldo/keto reductase family.