beautypg.com

Templatedata object, Evalfile, Load – HP NonStop G-Series User Manual

Page 299: Unload

background image

evalFile

int evalFile(String path, TemplateData data[])

path

A path of the template file

data

An array of TemplateData or Result objects

Returns 0 if success; -1 if the template file cannot be opened or there is an I/O error.

Usage Replace the tags in a template file with the values from a list of template data set. The
list is an array object.

load

int load(String path)

path

A path of the template file

Returns 0 if success, -1 if file cannot be opened.

Usage Load the template from a file into memory for faster access. The contents are cached
until the unload() is called.

unload

unload()

Usage Unload the cached template.

TemplateData Object

This object represents the data set that can be used by template processing. It provides an extra
method to import the ASP built-in Request object. The keys to the template data are the field
names in the data set.