Foreign nationals who are married to Chinese citizens and hold a residence permit can now transfer their residence permit to a work permit when they find a job without having to exit China.
Note that it is illegal to work with a residence permit in China if you are getting paid in China.
BEWARE: If you work as a volunteer but your employer makes money from your work, you are considered as working illegally. The same goes if you receive anything (food, service, etc.) in exchange for your work.