I'm a Sri Lankan passport holder going to apply for a Chinese X2 visa (short-term student visa). I want to know whether it's possible to get the visa with double entries from the Chinese embassy in Sri Lanka and get it extended in Beijing for another six months?
Chinese visas for residents are by nature single-entry: they're a way to let you in so that you can register as a resident. Once you arrive in China, you need to go through the process of converting this visa into a resident permit. Until this is done, you can't leave China (well, you can, but that voids the whole process and you'd have to start all over again). Your school will have an office that helps you with this.
Once you get the proper paperwork from your school and do the medical tests, you'll have to go to Immigration and give your paperwork and passport for a week or two. When you pick up your passport again, you'll have a new sticker in it, 外国人居留许可, saying you're a resident until DD MMM YYYY.
You will be able to extend your resident permit (not the visa, which by the time you enter China, will be voided) for another six months if you enrol in school for another term. And this as long as the school will have you. Be aware that the police checks on attendance records, and can deny you an extension if they think you're enrolling in a school only to get a visa, and are not a real student.
After enquiring, X2 visas are not only one-entry, but they can't be converted to a residence permit. So you can't leave China for the duration of the visa. Only X1 enables to get a resident permit, and go in and out of China.
Moreover, even on an X1 visa, you will only get 6 months on your residence permit, to be renewed every term. However, with an X1, you will be able to get in and out of China.