05-17-2022 08:38 PM
Hi,
I’m trying to create xml with repetitive child elements with a namespace.
My XML suppose to look like (input is a CSV file):
<?xml version="1.0" encoding="UTF-8"?>
<Invoice xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2">
<cbc:CustomizationID>urn:cen.eu:en16931:2017#conformant#urn:fdc:peppol.eu:2017:poacc:billing:international:aunz:3.0</cbc:CustomizationID>
<cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID>
<cbc:ID>Invoice01</cbc:ID>
<cbc:IssueDate>2019-07-29</cbc:IssueDate>
<cbc:DueDate>2019-08-30</cbc:DueDate>
<cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>
<cbc:Note>Tax invoice</cbc:Note>
<cbc:DocumentCurrencyCode>AUD</cbc:DocumentCurrencyCode>
<cbc:AccountingCost>4025:123:4343</cbc:AccountingCost>
<cbc:BuyerReference>0150abc</cbc:BuyerReference>
<cac:InvoicePeriod>
<cbc:StartDate>2019-06-01</cbc:StartDate>
<cbc:EndDate>2019-07-30</cbc:EndDate>
</cac:InvoicePeriod>
<cac:InvoiceLine>
<cbc:ID>2</cbc:ID>
</cac:InvoiceLine>
While doing the mapping I see below error 🙂
Expression parsing failed near – iceLines[* >> ] << .LineNumb (Reason: Mismatched input ‘,’ at line 8:43. Expecting one of: {, ‘||’, ‘&&’, ‘^’, ‘==’, ‘!=’, ‘>’, ‘<’, ‘>=’, ‘<=’, ‘+’, ‘-’, ‘*’, ‘/’, ‘%’, ‘?’, ‘instanceof’, ‘in’, ‘matches’, ‘[’, ‘}’, ‘(’, ‘,’, ‘.’, PropertyRef}; Resolution: Please check expression syntax)
The screenshot has attached for your reference, please suggest the fix. Thanks