How to instantiate an XML to several .JS files in NativeScript


I would like to know if it is possible to create an XML with several views and this load in different .js files, each view would only be visible in the .js file that corresponds to it.

XML file: general.xml
.JS file: first.js

¿or it is mandatory that each .JS file has its own XML?