Conceptually, XTemplate
provides similar functionality to that which Template
provides. However, it also provides certain advanced functionalities to work with the template and its data quickly. This recipe describes the use of XTemplate
and demonstrates the difference between XTemplate
and Template
.
Make sure that you have set up your development environment by following the recipes outlined in Chapter 1.
Carry out the following steps:
Create and open a new file named
ch04_02.js
and paste the following code into it: