User Tools

Site Tools


tplcodefromxml.htm
Navigation:  Templates > Guide to all Templates > Code Templates >====== FromXML code template ====== Previous pageReturn to chapter overviewNext page

This code template is used to import an XML file's contents into a designated target structure. It is similar to the Import From XML code template, but provides additional settings for more control as to the input contents.

Select Structure

Press the ellipsis button to select a valid label of a GROUP, FILE, VIEW or QUEUE to hold the contents of the import XML file.

Import file

Press the ellipsis button to select a valid XML source file to import. If you wish to select this file name at runtime, check the Select import file at runtime check box. You may also specify a variable here (Example: !FilenameVariable).

Mapping file (optional)

Press the ellipsis button to select a valid XML mapping file to use during import. In Clarion terms, mapping refers to associating an XML tag or schema to a database column name. If you wish to select this file at runtime, check the Select mapping file at runtime check box. You may also specify a variable here (Example: !FilenameVariable).

Root Tag:

Enter a hard coded string value, or specify a variable that will identify the root tag name (using the !variablename format) to begin the import from.

Row Tag:

Enter a hard coded string value, or specify a variable that will identify the row tag name (using the !variablename format) to begin the import from.

Use Schema on import

There are two ways to describe the elements of an XML document. The default is to use a DTD (Document Type Definition) to define the legal building blocks of an XML document. It defines the document structure with a list of legal elements. The alternative method is to use an XML Schema. Check this box to designate the Schema on import instead of the DTD.

Perform a silent import

Check this box if you wish to suppress error generation during the import process.

Customize Columns

Press this button that displays a list box interface where you can add custom mapping from the XML Tag Name to an existing column in your database.

Column

Select a valid label from the drop list. The elements contained here are reads from the Select Structure value.

XML Tag Name

Enter the target tag name to match to the selected column.

Picture

Enter a default picture to use to format the imported XML data.

XML Data Format

Select from Text, Cdata, or Base64. The default is Text.

XML Style

Select Tag-based or Attribute-based. This setting controls the XML formatted output style.

tplcodefromxml.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1