Here are te requirements:
1. Xa ultra latest clean Nougat/Marshmallow Firmware.
2. Unlocked bootloader (Search the thread for a tutorial)
3. Fastboot (Search for any fastboot tutorial and drivers)
4. Download file from this thread
-This method is just for Rooting, you won't have TWRP recovery installed.
1.- Connect your phone to your computer in fastboot mode, (Volume up pressed while connecting usb to your computer, until blue light flashes)
2.- Open Fastboot folder, and press shift+Right mouse clic, and select "open command window" (another method if you don't have this option is to press Windows button+R then in the window write cmd and click run it will appear a command window, then go to your fastboot folder and copy the address of your folder, go back to command windows and write cd space your fastboot address and then enter, you will be in fastboot)
3.- Once you are in fastboot write this fastboot devices and it must appear your phone connected.
4.- now write fastboot flash boot magiskxaultran.img if you are on Nougat firmware, and then press enter.
4.1.- now write fastboot flash boot magiskxaultram.img if you are on Marshmallow firmware, and then press enter
5.- disconnect your phone once the process is finished and turn on your phone.
6.- Now the latest thing to do is to Install the latest Magisk manager.apk to your phone.
7.- open magisk manager and you are now rooted.
Any question please feel free to ask