Toxgene: a template-based data generator for xml. ToXgene is a template-based generator for large, consistent collections of synthetic XML documents, developed as part of the ToX (the Toronto XML Server) project. ToX is an heterogeneous repository for XML data and metadata being developed at the Database Group of the University of Toronto. ToXgene was designed to be declarative, and thus speed up the data generation cycle; general enough to produce fairly complex XML content; and powerful enough to capture the most common kinds of integrity constraints in popular benchmarks. The ToXgene Template Specification Language (TSL) is a subset of the XML Schema notation augmented with annotations for specifying certain properties of the intended data, such as value distributions, the vocabulary for CDATA content, etc. Being template-based, our tool gives its users total control over the structure and content of the XML documents it produces.