Skip to Content
avatar image
Former Member

Importing Multi-Node XML Files

We are trying to import xml files that will be returned from XI and imported with one map and the Import Manager. Here is the XML structure:

  <?xml version="1.0" encoding="UTF-8" ?> 
- <ns1:CustomerCreateResp xmlns:ns1="urn:bp:xi:up:re:cust_mdm:cmdm:pr5:100">
    <CREATE_DATE /> 
    <TYPE /> 
    <MESSAGE /> 
  - <item>
      <MDM_CONTACT /> 
      <CONTACT /> 
  - <item>
      <CUSTOMERNO /> 

The trick is that there can be multiple CUSTOMERS returned in one file and within each one, there can be either one or more PT_CONTPART_RETURN items and one or more PARTNER_FUNCTION nodes. I will create a map for one node and it will see the structure differently when I try to reuse the map with a file returning more than one node. The reverse is also true. My problem is that I need ONE MAP for the return file, regardless of how many nodes it has. Oh, and just to make it fun, both PT_CONTPART_RETURN and PARTNER_FUNCTION map to qualified lookup tables which, surprisingly, isn't an issue.

Thank you all in advance!


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Jan 18, 2007 at 04:02 AM

    You have to create a XSD with repeatable nodes per your specification.

    Save this XSD in MDM Console.

    Use a sample xml with repeatable elements based on the above xsd.

    Now open the Import Manger with Destination Properties as XML Schema stored in MDM, and the sample XML File created in the previous step.

    Use this XML file to map to the MDM Destination Hierararchy.

    Save this Map.

    Create a port and assign this map.

    This way you can use the same map irrespective of whether the xml file has repeatable nodes or not.

    Hope this helps.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Michael Theis

      Michael, Thank you very much for your insightful response. It really helped me out. Something else I discovered, and something that was killing me, was the fact that the original schema, multiple customers were allowed, but MDM would see them differently producing a join if more than one and automatically flattening the file if only one. Thus, the map for multiple customers would not work for single customers and vice versa. But having the XI team recreate the schema to produce "items" for the Customers as well as the two repeating subnodes allowed me to bring in the schema and produce my maps. Now if I could just get the automatic value mapping to work. Thanks again! Don