The correlation between the soft X-ray and near-infrared emission from active galactic nuclei (AGNs) is analysed using composite models. We find new evidence for differences in the ranges of parameters that characterize the narrow-line region (NLR) of Seyfert galaxies and low-ionization nuclear emission regions (LINERs). Soft X-rays show less variability, so they are better fitted for this kind of analysis. In our models, soft X-rays are emitted in the postshock region of clouds with relatively high shock velocities V-s > 250 km s(-1). Consequently, dust emission peaks in the mid-infrared. On the other hand, in the photoionized zone, dust is at lower temperature and usually does not contribute to the mid-infrared emission. The results are sensible enough to allow the same modelling method to be applied to different types of AGN. We found that shock velocities are between 300 and 1000 km s(-1), with the NLR of low-luminosity active galactic nuclei (LLAGNs) and type 2 Seyfert galaxies (Sy2s) showing lower velocities than type 1 Seyfert galaxies (Syls). The intensity of the ionizing radiation flux at the Lyman limit from the central source is low for LINERs and low-luminosity AGNs (log F-h = 9 to 10), increasing towards Sy2s (log F-h similar to 11) and Sy 1 s (11 less than or equal to F-h less than or equal to 12). Results obtained by modelling the Einstein and the ROSAT samples of galaxies are in full agreement. Dust-to-gas ratios by number are greater than or equal to10(-14) in LINERs and LLAGN's, between 10(-15) and 3 x 10(-13) in Sy 1 s and up to 5 x 10(-13) in Sy2s. In order to fit the infrared and X-ray continua, an eta factor is defined, which accounts for the emitting area of the cloud. If the infrared emission is due to bremsstrahlung and comes from the same cloud that produces the soft X-rays, the eta values obtained from both emissions must be the same. Therefore, if (eta)(IR) < (η)(soft X), there must be a strong contribution of soft X-rays from the active centre. From the η values, we expect to identify the objects that could present strong variability.