You can purchase online directly or through an agent, but for non-HSR tickets it looks like you'll continue to need to get a paper ticket in exchange at a ticketing place (or delivered, perhaps). As mentioned here before, it does seem that China Rail is experimenting with ticket machines that accept passports, so ultimately you shouldn't have to wait in line at a ticket counter to get your paper ticket, you'll be able to use a machine.