It's quite simple:
- Add a Simple Data Writer listener to your test plan
- Provide path to XML results file in "Filename" input
- Click "Configure" button
- Make sure that "Save As XML" box is checked
- Tick other boxes according to metrics you would like to capture
Example configuration:

Be aware that storing results in XML is more resource consuming process, especially if you decide to store response data for all requests, massive IO activities may interfere load test flow and may ruin your test.
I would recommend storing just the necessary minimum of data and enable verbose logging only if you need to analyze some failure.
Example "good" configuration regarding which values are safe to save is listed in the JMeter Performance and Tuning Tips guide along with the other recommendations on how to properly configure JMeter instance(s)