Hi Enzo,
Did passing the XML document to the import mapping not work either? The documentation says you can pass a string, file document, or an Http request.
The documentation also has a good example on how to do an import from a file.
https://docs.mendix.com/howto/integration/importing-xml-documents