CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Threaded View

  1. #1
    Join Date
    Nov 2004
    Posts
    3

    Question Data mapping (xml-to-xml) using with Mapforce

    I am using MapForce data mapping tool.

    i have below XML data as Source which is having duplicate elements like code, name:

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

    <CustomerDetails xmlns="http://www.tdxgroup.com/namespace"

    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

    xsi:schemaLocation="http://www.tdxgroup.com/namespace:\TDX\mapforce\example2\Customer1.xsd">



    <Customer>

    <Code>C001</Code>

    <Name>Cust1</Name>

    <Phone>88888888</Phone>

    </Customer>



    <Customer>

    <Code>C001</Code>

    <Name>Cus1</Name>

    <Phone>77777777</Phone>

    </Customer>



    <Customer>

    <Code>C001</Code>

    <Name>Cust1</Name>

    <Phone>66666666</Phone>

    </Customer>



    <Customer>

    <Code>C002</Code>

    <Name>Cust2</Name>

    <Phone>55555555</Phone>

    </Customer>


    <Customer>

    <Code>C003</Code>

    <Name>Cust3</Name>
    <Phone>55555555</Phone>
    </Customer>

    </CustomerDetails>

    This dupication need to be remove from source to target xml as given below Target xml data:

    <CustomerDetails xmlns="http://tdxgroup.com/namespace"

    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

    xsi:schemaLocation="http://tdxgroup.com/namespace:\TDX\mapforce\example2\Customer2.xsd">



    <Customer>

    <Code>C001</Code>

    <Name>Cust1</Name>

    <Phones>
    <Phone>88888888</Phone>

    <Phone>77777777</Phone>

    <Phone>66666666</Phone>

    </Phones>

    </Customer>

    <Customer>
    <Code>C002</Code>

    <Name>Cust2</Name>
    <Phones>
    <Phone>11111111</Phone>
    </Phones>

    </Customer>

    </CustomerDetails>

    Is this possible through MapForce tool, if yes then please provide solution on this problem.

    For your reference please find the attachment.


    Thanks in adavance.



    Regards

    AK
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured