Javascript (Util?) function equivalent to livecycle exportdata function
I'm looking for a function that would do the same thing as the livecycle xfa.host.exportData function. I no longer have access to Reader Extensions, so I purchased Acrobat Pro to extend to Reader. Upgrading to AEM was just too cost prohibitive for us. ExportData and importData do not get extended to Reader with Acrobat. I found a function that takes the place of importData using the util.readFileIntoStream shown below (Compliments @radzmar https://thelivecycle.blogspot.com/2014/07/import-xml-via-script-into-adobe-reader.html) and the import button works fine in Reader. I need to do the same thing to Export XML data from the form. Can anyone point me in the right direction? Maybe there is a util function for it? I've looked exhaustively for a solution.
var vStream = util.readFileIntoStream();
if (vStream) {
var vImport, vImportData, vImportXML;
vImport = util.stringFromStream(vStream)
.replace(/(\<\?.*\?\>\s*)|(\<!-{2}(.|\n|\r)*-{2}\>)|(\r\n|\r|\n)/g, "");
vImportData = eval(vImport);
vImportXML = vImportData.toXMLString();
xfa.datasets.data.loadXML(vImportXML, false, true);
}