Hi Ishita,
The Haruki template works a little differently. It just builds a JavaScript object, then converts the object to JSON or XML. The output has the same information as the JavaScript object, and it's organized in the same way; for example, the object's property names are mapped directly to XML element names.
In contrast, the default template generates output by extracting lots of bits and pieces from the parse tree; wrapping those bits and pieces with HTML; and combining them into output files. The .tmpl files define the logic and the HTML structure for the conversion process.
You could certainly create a template that uses .tmpl files to generate XML, but Haruki's approach is simpler.
- Jeff