rrighini

xml export format help required

Discussion created by rrighini on Oct 2, 2012
Latest reply on Oct 3, 2012 by comment

Hi all,

 

I have a limited knowledge of xml structures - self taught. I have done xml exports before in this format

 

<?xml version='1.0' encoding='UTF-8' ?>
<xsl:stylesheet version='1.0'
xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
xmlns:fm="http://www.filemaker.com/fmpdsoresult"
exclude-result-prefixes="fm">
<xsl:output version='1.0' encoding='UTF-8' indent='yes' method='xml' />
<xsl:template match="/">

 

<PaymentList>
<Payment>
<xsl:for-each select="fm:FMPDSORESULT/fm:ROW[1]">

<PaymentTypeField><xsl:value-of select="./fm:DebitPaymentType" /></PaymentTypeField>
<DebitSortCodeField><xsl:value-of select="./fm:DebitSortCode" /></DebitSortCodeField>
<DebitAccountNumberField><xsl:value-of select="./fm:DebitAccountNo" /></DebitAccountNumberField>
<PaymentCurrencyField><xsl:value-of select="./fm:DebitPaymentCurrency" /></PaymentCurrencyField>
<PaymentAmountField><xsl:value-of select="./fm:InvoicePaymentsGrossSummary" /></PaymentAmountField>
<PaymentReferenceNumberField><xsl:value-of select="./fm:DebitPaymentReferenceNumber" /></PaymentReferenceNumberField>
<ValueDateField><xsl:value-of select="./fm:DebitPaymentDate" /></ValueDateField>
<DebitAccountNameField><xsl:value-of select="./fm:DebitAccountName" /></DebitAccountNameField>
</xsl:for-each>

<BeneficiaryList>
<xsl:for-each select="fm:FMPDSORESULT/fm:ROW">
<BeneficiaryItem>
<AccountNumber><xsl:value-of select="./fm:SupplierBankAccountNumber" /></AccountNumber>
<SortCode><xsl:value-of select="./fm:SupplierBankSortCode" /></SortCode>
<Amount><xsl:value-of select="./fm:InvoicePaymentsGrossTotal" /></Amount>
<AccountTypeIndicator><xsl:value-of select="./fm:SupplierAccountTypeIndicator" /></AccountTypeIndicator>
<Name><xsl:value-of select="./fm:SupplierName" /></Name>
<BankName><xsl:value-of select="./fm:SupplierBankName" /></BankName>
<PaymentReferenceNumber><xsl:value-of select="./fm:InvoiceNo" /></PaymentReferenceNumber>
</BeneficiaryItem>
</xsl:for-each>
</BeneficiaryList>
</Payment>
</PaymentList>
</xsl:template>
</xsl:stylesheet>

 

 

 

However, I need to be able to get my payments data out of FM for upload to an online bank account and they require this format.

 

 

Below is an example of a BACS GBP Multiple in XML format.

 

<PaymentList><Payment>

 

<PaymentTypeField> BACS_ Payment</PaymentTypeField> <DebitSortCodeField>300000</DebitSortCodeField> <DebitAccountNumberField>00001000</DebitAccountNumberField> <PaymentCurrencyField>GBP</PaymentCurrencyField> <PaymentAmountField>30000.00</PaymentAmountField> <PaymentReferenceNumberField>REFERENCE</PaymentReferenceNumberField> <ValueDateField>10-Nov-2011</ValueDateField> <DebitAccountNameField>GBP ACCOUNT</DebitAccountNameField> 7

 

<BeneficiaryList>

 

 

 

<BeneficiaryItem AccountNumber="12345678" SortCode="300001" Amount="10000.00" AccountTypeIndicator="" Name="BENEFICIARY NAME" BankName="LTSB" PaymentReferenceNumber="BEN REF" />

 

<BeneficiaryItem AccountNumber="

12345678" SortCode="300001" Amount="10000.00" AccountTypeIndicator="" Name="BENEFICIARY NAME" BankName="LTSB" PaymentReferenceNumber="BEN REF" />

 

 

<BeneficiaryItem AccountNumber="

12345678" SortCode="300001" Amount="10000.00" AccountTypeIndicator="" Name="BENEFICIARY NAME" BankName="LTSB" PaymentReferenceNumber="BEN REF" />

 

 

</BeneficiaryList>

</Payment> </PaymentList>

 

 

 

I've played around with my formatting but can't work out how to achieve the above.

 

Any help appreciated - our bills are stacking up!!!!

 

Thanks in advance

 

 

 

 

Outcomes