Can I install from Xcode**.xip if I save the installer on external hard drive ?

The issue I am facing is that I dont have 40 GB free space of free space on my Macbook air which is required by XCode to be installed.

I would like to explore the following :

download xcode 12.0.1 xip file directly from https://developer.apple.com/download/more/ to an external drive and install from there.

Anyone can help guide me if that's possible and how ?
I see no reason why you couldn't download Xcode 12 to an external drive, expand the xip file on the external drive, then copy Xcode from the external drive to the MacBook Air.
Can I install from Xcode**.xip if I save the installer on external hard drive ?
 
 
Q