Use this resignation letter if you've been asked to train your replacement and are unwilling or unable to do so.
Dear Mr./Ms. Bossname,
I've submitted my resignation. While I am happy to stay on for two more weeks, I am not willing to train my replacement.
I have dedicated my life to this industry, and to replace me with someone with so little (experience/education/years/comparable salary) is pathetic. I have too much respect for myself to go along with this extreme lapse in professional judgment.
To ask me to train my replacement is insulting to me and awkward for the new person. It's not in my job description, and if we can't see eye-to-eye on this I will just leave immediately.