Presumably you've got an electrical failure. Is the old one past repair - could it be repaired locally? You didn't say which bike it is?
Have a look at www.partsfish.com
Register, or if you like, use this account:
User name- firstname.lastname@example.org
Password - password
You then need to click 'add a vehicle' and select your bike.
Stator will prob. be listed under 'Left crankcase cover, generator'
Follow the parts list down at the bottom until you find stator. NB I just looked for an XL600-R, it's $307. NB if you click/hover over the 'add to cart' button, you will see the URL has the part number in it.
Hope this helps,
p.s. don't try mailing me at email@example.com