@AMOOR > Hopefully I can help and you can stop pulling your hair out!
Okay, so your music is all located on the external drive and you have also moved your master database to the external drive. This is your primary source and NOT your export device (although it could be used as both, I don't recommend it).
The instructions you followed (regarding the XML file) are out of date and unnecessary when moving the master database. It could be the changes you made there which are causing some tracks not to be located. Have you tried doing a mass relocation from the "all tracks" view of the library, selecting all songs and then right-click > relocate? Provided all tracks have moved in the same manner (the parent drive / folder has changed), the first relocation should set the software to find all the others.