Take a look here -
http://www.ontrackplant.com/
As has been said Excavators on the rails are basically the same as road going types but with a set of rail wheels fitted.
Conversions usually carried out by specialist contractors rather than the original makers.
Many excavators have a great range of attachments from Buckets to Crane fittings.
A lot of machines are fitted with man baskets for working on the Overhead lines.
At least 3 Different drive systems are in use.
One were the machine jacks itself up and the tyres drive the rail wheels.
This reverses the drive direction, sometimes called High Rail
Another more common one is for the tyres to run on the rail tops with a small set of rail wheels just used for guidance. Low Rail
The 3rd method is for a Hydraulically Driven axle to be fitted that lowers onto the rail and this provides power and guidance. Often used on Dozers.