Skip to Content

Source XML to Target XML - Mismatch of Data

Hi,

My scenario involves picking an xml file from legacy and mapping it to a MDM business content (imported an XSD thro' external definition) and after transformation parking the output as xml in the target system.

My source xml file contains:

<?xml version="1.0" encoding="UTF-8"?>

<Import>

<Row>

<PNALT>10000001</PNALT>

<NACHN>Nick</NACHN>

<VORNA>Fernand</VORNA>

<USRTY>Mail</USRTY>

abc@asdf.de

<USRTY>Tel</USRTY>

<USRTY>Fax</USRTY>

<USRID>0992 / 21-999</USRID>

</Row>

</Import>

The target output xml appears as mentioned hereunder:-

<?xml version="1.0" encoding="UTF-8" ?>

<EmployeeMsg>

<Records>

<Record>

<PersonnelNumber>10000001</PersonnelNumber>

<LastName>Fahrmehrsie</LastName>

<FirstName>Guntera</FirstName>

<CommunicationData>

<CommunicationType>Mail</CommunicationType>

</CommunicationData>

<CommunicationData>

<CommunicationType>Tel</CommunicationType>

abc@asdf.de

</CommunicationData>

<CommunicationData>

<CommunicationType>Fax</CommunicationType>

<CommunicationIDNumber>0993 / 21-999</CommunicationIDNumber>

</CommunicationData>

</Record>

</Records>

</EmployeeMsg>

I am getting a data mismatch in the target output. The mail id is coming under 'Tel'. How will I make the Mail Id to get it displayed under 'Mail'. I have set the <USERID> and <USRTY> to 0... Unbounded and <CommunicationType> and <CommuniationIDNumber> also to 0... Unbounded. I think I have gone wrong in the Mapping.

Can anyone suggest how to fix this issue. Thanks in advance.

Regards.

Praveen

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Apr 27, 2006 at 04:14 PM

    Hi Praveen

    Please check your mapping once again.

    may be you have some mis match in mapping.

    Regards

    Mitesh

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 28, 2006 at 08:23 AM

    Hi,

    Part of your target structure looks like :

    <b><CommunicationData></b><CommunicationType>Mail</CommunicationType>

    <b></CommunicationData></b>

    <b><CommunicationData></b><CommunicationType>Tel</CommunicationType>

    abc@asdf.de

    <b></CommunicationData></b>

    <b><CommunicationData></b><CommunicationType>Fax</CommunicationType>

    <CommunicationIDNumber>0993 / 21-999</CommunicationIDNumber>

    <b></CommunicationData></b>

    This means that, for every occurence of <CommunicationType> and <CommunicationIDNumber> a <CommunicationData> tag is to be created.

    You need to do the following:

    <CommunicationType> -splitByValue -<TCommunicationType>

    <CommunicationIDNumber> -splitByValue <TCommIDNumber>

    <CommunicationData> -splitByValue <TCommData>

    For every occurence of communicationType tag, you need a CommunicationID tag as a parent. Similarly, for communicationIDNumber. Hence, you need to do the above 3 steps.

    Regards,

    Smitha.

    Add comment
    10|10000 characters needed characters exceeded