IIEP - Configure XML Normalizer Pre-processor

While this pre-processor can be used for any inbound XML file, it has been useful for GDSN solutions when processing the following scenarios:

  • The GDSN BMS Receiver requires a flattened version of the recursive XML structures that are in the 'tradeItem' tags in the XML when dealing with child nodes in the packaging hierarchy.
  • A GDSN CIC is sent for the top node in the packaging hierarchy and contains the CIC status for all nodes in the hierarchy.

Important: For a successful import, verify that the node data is valid to exist in the new location.

For a simple example, as shown in the following XML input file (which could be available to the IIEP via the selected receiver method), although the 'AvailableFrom' tag is present in the file, it is required by STEP to be included at a lower level. The import file includes it at the 'Items' level, but it should be imported into STEP as an attribute on each of the two products within each 'Item' tag.

Configure and Use the XML Normalizer

  1. In the Configure Pre-processor dropdown, select XML Normalizer.
  2. Use the following parameters to identify the text to be copied and the new location for it to be copied.

  • In XPath to select the file type, add an XPath if needed. This parameter is optional. For more information, search the web.
  • In Search for nodes to copy below, identify the path of the parent tag where the copied text should be inserted. This can be an absolute path or a relative path matching any path containing the parent tag in the XML file.

Using the original example input file above, the path /ItemLoad/Items/Item indicates that the copied node will be placed within the 'Item' node.

  • In Name of new tag, type the new tag identifier. You must use different text than is currently used to additionally identify the tag that is copied. This tag must appear in the Sample file supplied in the 'Select Sample File' sub-step of the Configure Processing Engine wizard step. For more information on the sample file, refer to IIEP - Configure STEP Importer Processing Engine topic.

In the wizard image, 'AF_New' is the tag that will be added as a prefix to the information being copied. The normalized XML file below shows the newly copied tag with the '<AF_New>' wrapper.

  • In Node to copy, identify the path and the tag to be copied.

Using the original example input file, the node to copy (AvailableFrom) is currently located at /ItemLoad/Items/AvailableFrom.

  1. Include the new tag in the expected location, within the sample file supplied on the Select Sample File sub-step. For details, refer to the IIEP - Configure STEP Importer Processing Engine topic.

Using the original example input file, you could create the following Sample File which includes the new tag in the required location (as determined by the XML Normalizer parameters) :

  1. Include the new tag in the expected location, within the parsing template supplied on the Select Format sub-step. For details, refer to the IIEP - Configure STEP Importer Processing Engine topic.

Using with the original example, you could create the following Template which includes the instruction to retrieve data for the new tag:

  1. Click the Next button to display IIEP - Configure Processing Engine.

Pre-processor Results

Continuing the original example, the input file is normalized by the pre-processor as follows:

And ultimately, the STEP attributes are updated based on the normalized Generic XML, as shown in the first product from the input file.