Based on the ISO spectral catalogue of compact HII regions by Peeters et al. (2001), we present a first analysis of the hydrogen recombination and atomic fine-structure lines originated in the ionized gas. The sample consists of 34 HII regions located at galactocentric distances between Rgal = 0 and 15 kpc. The SWS HI recombination lines between 2 and 8 mum are used to estimate the extinction law at these wavelengths for 14 HII regions. An extinction in the K band between 0 and $sim$ 3 mag. has been derived. The fine-structure lines of N, O, Ne, S and Ar are detected in most of the sources. Most of these elements are observed in two different ionization stages probing a range in ionization potential up to 41 eV. The ISO data, by itself or combined with radio data taken from the literature, is used to derive the elemental abundances relative to hydrogen. The present data thus allow us to describe for each source its elemental abundance, its state of ionization and to constrain the properties of the ionizing star(s).