We calculate the X-ray emission from the shocked fast wind blown by the central stars of planetary nebulae (PNe) and compare with observations. Using spherically symmetric self-similar solutions, we calculate the flow structure and X-ray temperature for a fast wind slamming into a previously ejected slow wind. We find that the observed X-ray emission of six PNe can be accounted for by shocked wind segments that were expelled during the early-PN phase, if the fast wind speed is moderate, v(2)similar to 400-600 km s(-1), and the mass-loss rate is a few times 10(-7) M-circle dot yr(-1). We find, as proposed previously, that the morphology of the X-ray emission is in the form of a narrow ring inner to the optical bright part of the nebula. The bipolar X-ray morphology of several observed PNe, which indicates an important role of jets, rather than a spherical fast wind, cannot be explained by the flow studied here.