I'm not sure about the XR2, never flew it enough. I know that pretty much any vessel could be made compatible with the XR5, so if the payload system of XR2 is similar (which I assume) it shouldn't be a problem.
There is a tutorial for adding new payloads to the XR-5:
[ame="http://orbithangar.com/searchid.php?ID=3853"]Tutorial: Configuring Payloads for XR Vessels[/ame]
This tutorial explains how to configure Orbiter vessels (including Spacecraft3.dll vessels) as payloads for the XR-class vessels (XR5 Vanguard and XR2 Ravenstar) using the Payload Management System.