I found help on the 'net but expanded it to this (can't find how to put the pictures in!)
Dyson DC0 - Mains Cable Replacement
As others have noted the first operation is to remove the (Yellow) switch cover. First however, remove the handle tube to give more room and flexibility in the region of the switch. Then:
1. Carefully insert a flat bladed instrument down each side of the switch cover, at an approximate angle of 450 to the vertical and pointing inwards so that the tip of each goes inside the wall of the inner moulding. If you haven’t done this before this doesn’t make a lot of sense, but if you look at Figs 1, 2 & 3 you should get the idea.
2. A 3rd flat blade is inserted under the top rear of the switch cover, as shown.
3. This next part is easiest with 2 pairs of hands, but can be done with 1 pair! Move the handles of the first 2 instruments carefully outwards. This will bulge the main casing slightly, but more importantly will spring the retaining lugs of the switch cover out of their sockets. At the same time, lever upwards with the 3rd blade and the switch cover should pop out.
4. Relax! That’s the tricky part over—but be careful not to lose the switch cover spring, remove and put somewhere safe.
5. Now remove the Torqx headed screw (T-15 size) from the middle of the switch housing. It is NOT a socket headed screw although you can bodge it and use one although this is not good and Torqx drivers are freely available.
The whole switch housing can now be removed from the main housing.
Now you can disconnect the spade connectors from the bottom of the switch itself and remove the mains cable strain relief tail from the switch housing, allowing you then to remove the mains cable completely. Remove the spade connector covers and keep safe.
Chop off the mains cable just before the entry to the strain relief tail and then put the tail in hot water for a minute or two, after which you can remove the cable remnant from the tail.
Dry the tail and whilst it is still warm push the cut end of the mains cable into and through the tail, until you have about 125mm or so on the inside of the cable gland.
Cut back the outside of the cable sheath to the same length as the original and then bare the ends of the blue and brown wires about 6mm.
Fit new crimp spade connectors to the wires ensuring they are secure and then feed the cable through the switch housing.
Re-fit the Spade connector outer covers and push each connector onto its appropriate spade terminal.
Slide the switch housing into place and fit the cable gland into the main casing, adjusting the cable length appropriately.
Re-fit the Torqx screw.
Carefully push the switch cover back into its sockets.
Gophertoday
February 2007