An xml file defines a user interface. Each XML element is compiled into an Android GUI class with characteristics represented by methods during compilation.