I have some web development experience and am learning how to build android apps.

I understand that XML layout allows a separation of program logic and (UI-) layout. This seems to be analogous to the separation of JavaScript from HTML/CSS.

But what plays the role of a server-side scripting language? i.e. if there is a list of audio files which the user could click on to play, how do I auto-generate the XML layout (which, in the web world, I would have done by interleaving HTML and PHP)? Or am I forced to do this programmatically?