The observed radio-optical-X-ray spectral energy distributions ( SEDs ) of 22 hot spots and 45 knots in the jets of 35 active galactic nuclei are complied from literature and modeled with single-zone lepton models . It is found that the observed luminosities at 5 GHz ( L _ { 5 GHz } ) and at 1 keV ( L _ { 1 keV } ) are tightly correlated , and the two kinds of sources can be roughly separated with a division of L _ { 1 keV } = L _ { 5 GHz } . Our SED fits show that the mechanisms of the X-rays are diverse . While the X-ray emission of a small fraction of the sources is a simple extrapolation of the synchrotron radiation for the radio-to-optical emission , an inverse Compton ( IC ) scattering component is necessary to model the X-rays for most of the sources . Considering the sources at rest ( the Doppler factor \delta = 1 ) , the synchrotron-self-Compton ( SSC ) scattering would dominate the IC process . This model can interpret the X-rays of some hot spots with a magnetic field strength ( B _ { ssc } ^ { \delta = 1 } ) being consistent with the equipartition magnetic field ( B _ { eq } ^ { \delta = 1 } ) in one order of magnitude , but an unreasonably low B _ { ssc } ^ { \delta = 1 } is required to model the X-rays for all knots . Measuring the deviation between B _ { ssc } ^ { \delta = 1 } and B _ { eq } ^ { \delta = 1 } with ratio R _ { B } \equiv B _ { eq } ^ { \delta = 1 } / B _ { ssc } ^ { \delta = 1 } , we find that R _ { B } is greater than 1 and it is tightly anti-correlated with ratio R _ { L } \equiv L _ { 1 keV } / L _ { 5 GHz } for both the knots and the hot spots . We propose that the deviation may be due to the neglect of the relativistic bulk motion for these sources . Considering this effect , the IC/CMB component would dominate the IC process . We show that the IC/CMB model well explains the X-ray emission for most sources under the equipartition condition . Although the derived beaming factor ( \delta ) and co-moving equipartition magnetic field ( B _ { eq } ^ { { } ^ { \prime } } ) of some hot spots are comparable to the knots , the \delta values of the hot spots tend to be smaller and their B _ { eq } ^ { { } ^ { \prime } } values tend to be larger than that of the knots , favoring the idea that the hot spots are jet termination and knots are a part of a well-collimated jet . Both B _ { eq } ^ { { } ^ { \prime } } and \delta are tentatively correlated with R _ { L } . Corrected by the beaming effect , the L ^ { { } ^ { \prime } } _ { 5 GHz } - L ^ { { } ^ { \prime } } _ { 1 keV } relations for the two kinds of sources are even tighter than the observed ones . These facts suggest that , under the equipartition condition , the observational differences of the X-rays from the knots and hot spots may be mainly due the differences on the Doppler boosting effect and the co-moving magnetic field of the two kinds of sources . Our IC scattering models predict a prominent GeV-TeV component in the SEDs for some sources , which are detectable with H.E.S.S . and Fermi /LAT .