Once, the French COS were interviewed about the same question: what to do in front of child soldier. The answer was interesting: we have to remember that we have children in front of us but we have to not forget that they are soldiers too.
The IHL gives a clear line: children are not to be soldiers and are protected both as legitimate target and troops.
In the case of being confronted to child soldiers (Mike will clarify this much better than me), norm is that you try to restrain a maximum. Anyways, the one who is really guilty is the one who recruits children to be soldiers, not the one being confronted and has to defend.
A lot of interesting stuff on the Save The Children and ICRC web sites.