IMPORTANT:
this is not a Support Forum! Experienced users might answer from time to time questions posted here. If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

Excel to XML multiple tabs Options · View
domjc1962
Posted: Friday, January 30, 2015 9:06:24 PM
Rank: Newbie

Joined: 1/26/2015
Posts: 4
Location: United States
This is the XML im currently getting - I think I need a filter - I have tried setting a filter but it is not working

I have attached the spreadsheet im trying to create an XML from
I have attached the saved mapping
First Tab is a list of loans
Second tab is a list of loan amounts by sequence

sequence is the linker between tabs

XSD is to large to attach

<?xml version="1.0" encoding="UTF-8"?>
<DEAL xmlns="http://www.mismo.org/residential/2009/schemas" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mismo.org/residential/2009/schemas C:/Users/domjc1962/Desktop/UCD33~1.029/V3.3.0_CR_2014-02/ReferenceModel_v3.3.0_B299/Combined/MISMO_3.3.0_B299.xsd">
<LOANS>
<LOAN SequenceNumber="1">
<LOAN_DETAIL>
<TotalSubordinateFinancingAmount>12</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>23</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>34</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>45</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>546</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>34</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>45</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>56</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>45</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>34</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>23</TotalSubordinateFinancingAmount>
</LOAN_DETAIL>
</LOAN>
<LOAN SequenceNumber="2">
<LOAN_DETAIL>
<TotalSubordinateFinancingAmount>12</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>23</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>34</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>45</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>546</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>34</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>45</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>56</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>45</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>34</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>23</TotalSubordinateFinancingAmount>
</LOAN_DETAIL>
</LOAN>
<LOAN SequenceNumber="3">
<LOAN_DETAIL>
<TotalSubordinateFinancingAmount>12</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>23</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>34</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>45</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>546</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>34</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>45</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>56</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>45</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>34</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>23</TotalSubordinateFinancingAmount>
</LOAN_DETAIL>
</LOAN>
<LOAN SequenceNumber="4">
<LOAN_DETAIL>
<TotalSubordinateFinancingAmount>12</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>23</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>34</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>45</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>546</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>34</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>45</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>56</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>45</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>34</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>23</TotalSubordinateFinancingAmount>
</LOAN_DETAIL>
</LOAN>
<LOAN SequenceNumber="5">
<LOAN_DETAIL>
<TotalSubordinateFinancingAmount>12</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>23</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>34</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>45</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>546</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>34</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>45</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>56</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>45</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>34</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>23</TotalSubordinateFinancingAmount>
</LOAN_DETAIL>
</LOAN>
<LOAN SequenceNumber="6">
<LOAN_DETAIL>
<TotalSubordinateFinancingAmount>12</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>23</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>34</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>45</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>546</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>34</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>45</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>56</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>45</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>34</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>23</TotalSubordinateFinancingAmount>
</LOAN_DETAIL>
</LOAN>
</LOANS>
</DEAL>

This is the XML im trying to get

<?xml version="1.0" encoding="UTF-8"?>
<DEAL xmlns="http://www.mismo.org/residential/2009/schemas" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mismo.org/residential/2009/schemas C:/Users/domjc1962/Desktop/UCD33~1.029/V3.3.0_CR_2014-02/ReferenceModel_v3.3.0_B299/Combined/MISMO_3.3.0_B299.xsd">
<LOANS>
<LOAN SequenceNumber="1">
<LOAN_DETAIL>
<TotalSubordinateFinancingAmount>12</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>23</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>34</TotalSubordinateFinancingAmount>
</LOAN_DETAIL>
</LOAN>
<LOAN SequenceNumber="2">
<LOAN_DETAIL>
<TotalSubordinateFinancingAmount>45</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>546</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>34</TotalSubordinateFinancingAmount>
</LOAN_DETAIL>
</LOAN>
<LOAN SequenceNumber="3">
<LOAN_DETAIL>
<TotalSubordinateFinancingAmount>45</TotalSubordinateFinancingAmount>
<TotalSubordinateFinancingAmount>56</TotalSubordinateFinancingAmount>
</LOAN_DETAIL>
</LOAN>
<LOAN SequenceNumber="4">
<LOAN_DETAIL>
<TotalSubordinateFinancingAmount>45</TotalSubordinateFinancingAmount>
</LOAN_DETAIL>
</LOAN>
<LOAN SequenceNumber="5">
<LOAN_DETAIL>
<TotalSubordinateFinancingAmount>34</TotalSubordinateFinancingAmount>
</LOAN_DETAIL>
</LOAN>
<LOAN SequenceNumber="6">
<LOAN_DETAIL>
<TotalSubordinateFinancingAmount>23</TotalSubordinateFinancingAmount>
</LOAN_DETAIL>
</LOAN>
</LOANS>
</DEAL>


File Attachment(s):
Loan Test.xlsx (9kb) downloaded 284 time(s).
EXCEL UCD to XML.mfd (12kb) downloaded 213 time(s).


vlad
Posted: Saturday, January 31, 2015 11:09:50 AM
Rank: Advanced Member

Joined: 12/13/2005
Posts: 2,856
Location: Mauritius
You have overcomplicated your mapping. When working with MapForce you need to simply try to pronounce the task and then just connect the lines:

- I want to output a LOAN element for each Loan entry (row) from Excel - I connect Loan Rows to the LOAN element
- I want Sequence column go to the SequenceNumber XML element - I connect both
- I want Loan Amount to fill TotalSubordinates, but only if Sequence on Loan Detail is equal to the Sequence on Loan - I do this with a filter and equal

That's it. This is your mapping


vlad attached the following image(s):
Capture.PNG

domjc1962
Posted: Saturday, January 31, 2015 3:40:45 PM
Rank: Newbie

Joined: 1/26/2015
Posts: 4
Location: United States
Thank you VLAD
Users browsing this topic
guest

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Use of the Altova User Forum(s) is governed by the Altova Terms of Use.