Import.XML.UseTemplate

Description

Setting that optionally controls the logical structure of the XML imported from an XML file into a DataWindow object using the ImportFile method.

Applies to

DataWindow objects

Syntax

Describe and Modify argument:

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

Parameter

Description

value

(exp) A string specifying the name of an import 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 imported before you call the ImportFile method to import data from an XML document. An import template is not required if the XML document from which data is imported corresponds to the DataWindow column definition.

If an export template for a DataWindow object exists, it can be used as an import template. Only the mapping of column names to element attribute names is used for import. The order of elements within the template is not significant, because import values are located by name match and nesting depth within the XML document. All other information in the template, such as controls and comments, is ignored.


In the painter

In the Data Import category in the Properties window for the DataWindow object, select XML from the Import list and select a template from the UseTemplate list.

Examples

Example 1

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

[Visual Basic]
dw1.Modify("DataWindow.Import.XML.UseTemplate = 't_import_report' ")

See also