Generate a module from an XML specification