A man has been labelled a 'danger to children' after making sexual comments to a Swindon girl walking to school.