This tutorial describes how to create a custom Groovy builder class similar to those provided by the Groovy Development Kit (GDK) such as MarkupBuilder or SwingBuilder. These builder classes get their name from the GoF Builder pattern in that they are used to create complex objects. The MarkupBuilder for example, can create an XML document. What makes MakupBuilder interesting is how it does so, by using Groovy's metaprogramming and closure functionality so that a method invoked on the builder becomes a tag name in the xml and named parameters become the tag's attributes.