You need to use an Import Mapping to import data into Mendix, or an Export Mapping to export it.
https://docs.mendix.com/refguide/mapping-documents
These can import and export XML for you.
https://docs.mendix.com/howto/integration/importing-xml-documents
https://docs.mendix.com/howto/integration/export-xml-documents
Hope this helps