The programming language XL ('eXtended L-system language') is an extension of Java, which supports the specification and execution of relational growth grammars, a variant of parallel graph grammars. XL is a powerful generalisation of the well-known L-system approach to functional-structural plant modelling. Some features of XL are discussed that are particularly useful for combining structure and function and for querying plant architectural data, and an exemplary functional-structural plant model of young beech trees is presented that is implemented in XL and includes PAR distribution, assimilate allocation and morphological plasticity. Together with a simpler model of spruce trees, this beech model is included in a virtual landscape with a mixed-species forest stand where competition for light occurs. The open-source platform GroIMP was used for the complete model development process and for visualising the results.