...
DocNameSpace,XMLNewChild,Prefix);
XMLCurrNode := XMLNewChild;
AddAttribute(XMLCurrNode,'currencyID',CurrencyCode);
XMLCurrNode := XMLCurrNode.parentNode;
// Delete the following line.
AddElement(XMLCurrNode,'BaseQuantity',OIOUBLDocumentEncode.DecimalToText(ServInvLine.Quantity),
DocNameSpace,XMLNewChild,Prefix);
XMLCurrNode := XMLNewChild;
AddAttribute(XMLNewChild,'unitCode',ServInvLine."Unit of Measure Code");
XMLCurrNode := XMLCurrNode.parentNode;
...
...
DocNameSpace,XMLNewChild,Prefix);
XMLCurrNode := XMLNewChild;
AddAttribute(XMLCurrNode,'currencyID',CurrencyCode);
XMLCurrNode := XMLCurrNode.parentNode;
// Add the following line.
AddElement(XMLCurrNode,'BaseQuantity',OIOUBLDocumentEncode.DecimalToText(ABS(ServInvLine.Quantity)),
DocNameSpace,XMLNewChild,Prefix);
XMLCurrNode := XMLNewChild;
AddAttribute(XMLNewChild,'unitCode',ServInvLine."Unit of Measure Code");
XMLCurrNode := XMLCurrNode.parentNode;
...