Talk to them, ask them to think of something that makes them happy. Never ask them to smile or say cheese, just explain that you will talk to them and as you are talking will be taking lots of shots, compliment them on their best features (not in a pervy way), lovely eyes, high cheekbones, lucious lips, nice hairstyle.
With children, don't say things like, this won't hurt or relax, try to draw them out with some chat at their level, don't talk down to them, listen to what they have to say and expand upon it, if they are interested or have a passion in something, talking about it will relax them and make them smile naturally.