Two DataWindow properties, Export.XML.TemplateCount and Export.XML.Template[ ].Name, enable you to provide a list of templates from which the user of the application can select at runtime.
The TemplateCount property gets the number of templates associated with a DataWindow object. You can use this number as the upper limit in a FOR loop that populates a drop-down list with the template names. The FOR loop uses the Template[ ].Name property.
String templateCount=
dw_1.describe(“DataWindow.Export.XML.TemplateCount”);
int count=Integer.parseInt(templateCount);
String templateArray[]=new String[count];
for (int i=1; i<=count; i++)
{
templateArray[i-1]=
dw_1.describe("DataWindow.Export.XML.Template
[" + i + "].Name");
}