No, you can’t.
One License is for ONE installation.
If you upgrade using that illegal method, you will end up with a non-genuine, illegal Windows 10.
It is an upgrade to 10 and relies on a legal, activated qualifying License to upgrade from, as the legal and activated qualifying License is absorbed during the 10 install process resulting in a legal Windows 10 final product.
And older XP machines should not be upgraded to 10 anyway, due to Hardware incompatibility in most cases.