Nanocapsule formation by electrospinning