We present the HI data for 5 spiral galaxies that, along with their Halpha rotation curves, are used to derive the distribution of dark matter within these objects. A new method for extracting rotation curves from HI data cubes is presented; this takes into account the existence of a warp and minimises projection effects. The rotation curves obtained are tested by taking them as input to construct model data cubes that are compared to the observed ones: the agreement is excellent. On the contrary, the model data cubes built using rotation curves obtained with standard methods, such as the first-moment analysis, fail the test. The HI rotation curves agree well with the Halpha data, where they coexist. Moreover, the combined Halpha + HI rotation curves are smooth, symmetric and extended to large radii. The rotation curves are decomposed into stellar, gaseous and dark matter contributions and the inferred density distribution is compared to various mass distributions: dark haloes with a central density core, $Lambda$ Cold Dark Matter ($Lambda$CDM) haloes (NFW, Moore profiles), HI scaling and MOND. The observations point to haloes with constant density cores of size $r_{core} sim r_{opt}$ and central densities scaling approximately as $rho_0 propto r_{core}^{-2/3}$. $Lambda$CDM models (which predict a central cusp in the density profile) are in clear conflict with the data. HI scaling and MOND cannot account for the observed kinematics: we find some counter-examples.