I'm trying to create XML from a spreadsheet, via a schema provided by a vendor.
I've created some XML from the spreadsheet, (attached), that has company names and contacts.
What I want to end up with is several contacts for each unique company. What I'm getting now is a single account and contact for each row of my spreadsheet. An example is:
What I want:
<Account>
<AccountName="AAA Aircraft">
<Contacts>
<Contact>
<ContactName = "Betty">...
</Contact>
<Contact>
<ContactName = "Jane">
</Contact>
</Contacts>
</Account>
What I'm getting:
<Account>
<AccountName="AAA Aircraft">
<Contacts>
<Contact>
<ContactName = "Betty">...
</Contact>
<Contacts>
</Account>
<Account>
<AccountName="AAA Aircraft">
<Contacts>
<Contact>
<ContactName = "Jane">...
</Contact>
<Contacts>
</Account>
sample(5).xml Sample of my source XML
|