Export.XML.UseTemplate

Description

Setting that optionally controls the logical structure of the XML exported from a DataWindow object using the SaveAs method or the .Data.XML property.

Applies to

DataWindow objects

Syntax

Describe and Modify argument:

"DataWindow.Export.XML.UseTemplate { = 'value ' }"

Parameter

Description

value

(exp) A string specifying the name of an export template previously saved in the DataWindow painter for the specified DataWindow object

Usage

This property should be set to specify the logical structure of the XML generated before you call the SaveAs method with XML! as the SaveAsType to save data as an XML document, or use the .Data.XML expression to save data as an XML string.


In the painter

In the Data Export category in the Properties window for the DataWindow object, select XML from the Export list and select a template from the Use Template list.

Examples

Example 1

This example stores the name of the export template used in dw1 in the string ls_template. If no template is selected in dw1, an empty string is returned.

[Visual Basic]
ls_template_name = dw1.Describe("DataWindow.Export.XML.UseTemplate")

Example 2

This example sets the name of the current XML export template used in dw1 to t_report. If t_report does not exist, the current template is not changed.

dw1.Modify("DataWindow.Export.XML.UseTemplate = 't_report' ")

See also