I think from your previous post, you are already overriding mousePressEvent in your list widget to create a custom QDrag instance with the proper text mime type. Do the same thing here, except replace the list widget text with your XML string. If you will be dragging from the list widget into multiple other widgets, then you can add both "text/plain" and "text/xml" mime types to your QMimeData and select the one you want when you handle the drop event.

In the XML list widget, you will need to write code to handle the dropEvent() and / or dragEnterEvent() to look for the "text/xml" type. If the mime data doesn't have it, you don't accept the drop. This will prevent drops of unrelated text dragged from somewhere else. You can handle these events by installing an event filter on the XML list widget.