I need generate the following XML in swift 5 in order to post it with Alamofire. I tried doing this with XMLMapper but could not figure out how to handle this. Could anyone give some advice?
<SERVICE name="dataservice/transaction.getView">
<PARAMETERS>
<PARAMETER name='columnList'>PERSON.FIRSTNAME,PERSON.PREFIX,PERSON.NAME,ACCESSKEY.RCN,READER.NAME</PARAMETER>
<PARAMETER name='filterTransTypeList'>1,2</PARAMETER>
<PARAMETER name='fromDate'>2021-01-17 00:00:00</PARAMETER>
</PARAMETERS>
</SERVICE>
best regards,
Patrick
Using XMLMapper, you can generate this XML.
Try the following model:
Generate your XML like:
or send it with Alamofire (using
Requestssubspec):