Which kinds of oxygen groups are wanted ? Carboxyls, carbonyls, hydroxyls, ...? All can be obtained at once by oxidation in hot HNO3 par exemple, but some of them can be removed (thus leaving the others) by heat-treatment in nitrogen at controlled temperature and/or selective reduction.