Working With XML Files

Business Importer can import data from XML files that meet the following requirements:
  • The XML file must have a single root element (of any name) that contains all the other elements that will be imported.
  • All the child elements of the root node must be identical element types.
Here is a simple example:
<AssetsToImport>
    <Asset  AssetLocation="Boston"
            AssetName="WKS-00312"
            AssetDeliveryDate="12/05/2007" />
    <Asset  AssetLocation="Los Angelse"
            AssetName="LTP-02321"
            AssetDeliveryDate="04/08/2009" />
</AssetsToImport>

Connection to XML files

To specify the connection in the XML adapter file, the only parameters to set are:
  • The data source Type="XML"
  • The connection string, which must contain both the path to and name of the source XML file (see example below).

Example XML adapter file for importing from an XML source

In the XML adapter file, the mapping to compliance database properties uses the names of the XML tags in the source file. For example, using the XML source file example shown above, the XML adapter file contains:
<Import Name="Asset"
      Type="XML"
      ConnectionString="C:\Assets.xml">
	<Object Name="Asset"
		Type="asset"
		Output="assetoutid"
		Update="true"
		Create="true">
		<Property Name="Short Description"
			Type="shortdescription"
			Update="Never"
			Value="AssetName"
			ValueType="Field Value"
			UseForMatching="true"/>
		<Property Name="Location"
			Type="location"
			Update="Always"
			Value="AssetLocation"
			ValueType="Field Value"
			UseForMatching="False"/>
		<Property Name="Delivery Date
			"Type="deliverydate"
			Update="Always"
			Value="AssetDeliveryDate"
			ValueType="Field Value"
			UseForMatching="False"/>
	</Object>
</Import>

FlexNet Manager Suite (On-Premises)

2023 R2