Section \[sec:Discussion\].

To better link this study to previous analysis of NICMOS planetary spectra, we re-analyze the XO-1b data following the procedure developed for XO-2b. The results are presented in appendix \[sec:Analysis of XO-1 with NICMOS\].

Observations {#sec:Observations}
============

Three transits of XO-2b were observed in spectrophotometry by HST NICMOS, on 2007 November 2, 2007 December 11, and 2008 February 12. Each visit is divided into 5 HST orbits, containing 68 images of 32 s each. In total, 1006 images were acquired. We used the G141 grism, covering a spectral range from 1.1 to 1.9 $\mu$m. The length of the spectral trace is $\sim110$ pixels, and the PSF (Point Spread Function) was defocused to a FWHM (Full Width Half Maximum) of 5 pixels to minimize the effect of inter- and intra-pixel variations. The resulting spectral resolution $R=\lambda /{\Delta\lambda} = 37 $. The detector is read out in MULTIACCUM mode with NSAMP = 10, *i.e.* each image is composed of 10 successive readouts. When necessary, we will designate XO-2 as XO-2 N, and the companion star as XO-2 S (XO-2 N is located 30" north of XO-2 S). The position of both stars on the detector is the same in the 