Yes, you should be able to do this by using the method Greg described. I hope you are using managed code, because that will make things easier.
string myxml = thisXDocument.DOM.xml;
string myxml_base64 = base64Encode( myxml );
The base64Encode method can be found here:
http://www.vbforums.com/showthread.php?s=&threadid=287324If you are using JScript or VBScript you'll need to scour the internet for some base64 methods that other people have written. Or maybe write one yourself. But if you do this, please share!
Matt Faus / Microsoft InfoPath MVPQdabra® Software / Streamline data gathering to turn process into knowledge