A system for updating a domain model and generating a formatted output is
disclosed. The system comprises a template driven emitter which processes
a template file. The template file comprises directives which direct
extraction of data from a source data model into a target data model. The
template file also comprises directives for manipulating the DOM tree of
the data model. The template driven emitter generates a DOM tree for the
source data model and a DOM tree for the template file. The template
driven emitter utilizes the DOM tree to navigate the data model and
extract data as specified according to the directives in the template
file. The template file is written as a text file and expressed in XML.