Oxiclean does work on carpet stains as long as the carpet stain hasn't set in too bad but even then sometimes the oxiclean may remove it.
But you might also need to mix some vinegar and baking soda together and scrub out the carpet stain and then use a carpet cleaner over the carpet to get really tough stains out.
You can also use some hydrogen peroxide which is one of the ingredients in oxiclean to clean carpets and carpet stains.
Although I've had pretty good luck using oxiclean to get carpet stains out and it doesn't harm the carpet either.
If you have a carpet cleaning machine you can also add some oxiclean to your carpet cleaning machine or carpet shampooer to clean the carpet.