Description

Imports XML data into an OpenInsight table, optionally using an XML template.

Syntax

retval = XML_Importer' (parent, XML_File, Batch_Flag, Schema_Name, Key_Tag, Target_Tags, Dict_Mappings, OI_Data_File, Create_Flag, Template_Name, Storage_Opts)

Parameters

The Inet_OI_XML function has the following parameters:

TopicDescription
ParentThe parent window of the calling process.
XML_FileThe fully qualified name (e.g., C:\XMLFILES\CUSTOMERS.XML) of the operating system file containing the XML data to be imported.
Batch_FlagA boolean value indicating whether or not the program is being run in batch mode. In batch mode, the program will not display informational messages. Pass a 1 to indicate batch mode. Pass 0 or null for interactive mode.
Schema_NameThe name of the schema file associated with the XML file.
Key_TagThe tag in the XML file that will be used as a key in the OpenInsight file.
Target_TagsA value-mark delimited list of tags that will be extracted and placed into the OpenInsight file. The values in Target_Tags have a one-to-one correspondence with the values in the Dict_Mappings parameter.
Dict_MappingsA value-mark delimited list of dictionary fieldnames into which the target tags will be mapped. Based upon Storage_Opts this parameter may be null. The values in Dict_Mappings have a one-to-one correspondence with the values in the Target_Tags parameter.
OI_Data_FileThe name of the OpenInsight file into which the XML data will be placed.
Create_FlagA boolean flag indicating whether or not the OI_Data_File should be created.

Note: This functionality will not work in runtime versions of OpenInsight.

Template_NameThe name of an import template that has been saved. To run imports programmatically, provide this parameter. Otherwise pass a null.

Note: If Template_Name is passed as null, the user is prompted for null parameters at runtime. If Template_Name is not null, any null parameters are assumed to be null.

Storage_Opts

Indicates how data will be stored in fields in the OpenInsight table. One of three possible values is allowed:

ValueMeaning
CCreate new 'F' type fields.

Note: This is not a valid option in Runtime versions of OpenInsight.

EMap to existing 'F' type fields.
DCreate a new 'F' type field embedded with raw XML. Also create new symbolic fields to extract the XML data.

Note: This is not a valid option in Runtime versions of OpenInsight.

Returns

Returns a null, whether or not any errors were encountered.

See also

Inet_Msg()Inet_Repos()Inet_Rlist()Inet_Security()Inet_Trace()Inet_OI_XML()

Examples

*  Import XML data into OI table using NJ_CUSTOMERS XML Import template
retval = xml_importer('','', '', '' ,'', '', '', '' , '', 'NJ_CUSTOMERS')
 
*  Prompt for import parameters
retval = xml_importer()
 
*  Import XML data using NJ_CUSTOMERS template, overriding Create_Flag
 
retval = xml_importer('','', '', '' ,'', '', '', '' , 'Y', 'NJ_CUSTOMERS')
  • No labels