Altova MapForce 2025 Professional Edition

Connect Second Source and Target

Home Prev Top Next

The last step of the tutorial is to connect the second source component (Library) with the target component (MergedLibrary). In order to do this, connect the <publication> element in Library.xml with the <publication> element in MergedLibrary.xml. Since the target input connector already has a connection, MapForce will prompt you to replace the connection or to duplicate the input. In this tutorial, our goal is to map data from two sources to one target. Therefore, click Duplicate Input. By doing so, you configure the target component in such a way that it will accept the data from the second source, too. The mapping now looks as follows:

MF_Tut2_MakeCon2

The screenshot above demonstrates that the publication element in the target component has been duplicated. The new publication(2) node will accept data from Library.xml. Importantly, even though the name of this node appears as publication(2) in the mapping, its name in the target XML file will be publication, which is our goal in this case.

 

Copy-all connection

Since the child elements of the publication element in the Library component and the publication element in the MergedLibrary component have the same names and data types, these elements are connected with one thick line. Such a connection is called a copy-all connection, which makes the mapping easier to understand.

 

Preview the output

Open the Output pane to view the result. You will notice that the data from both Books.xml and Library.xml has now been merged into the new MergedLibrary.xml file. For your convenience, the mapping design in this tutorial is saved as Tut2_MultipleToOne.mfd. This mapping will be used as a starting point in the next tutorial.

 

© 2018-2024 Altova GmbH