Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
In order to demonstrate how to create XML documents using the Template Toolkit, we will use the example of creating an XML document that contains data about a TV show. Let's use (to pick a show at random) Buffy the Vampire Slayer.
A TV show consists of a number of seasons. Generally, one season is made each year. Each season will have a regular cast. A season consists of a number of episodes. We want to create an XML file that contains all of this data.