This is not something I've ever done in a 'real-world' app, so no promises,
but based on very limited testing, this seems to work ...
using System;
namespace ConsoleApplication22
{
class Class1
{
[STAThread]
static void Main(string[] args)
{
Microsoft.Office.Interop.Access.Application app =
new Microsoft.Office.Interop.Access.Application();
app.AutomationSecurity = Microsoft.Office.Core.MsoAutomationSecurity.
msoAutomationSecurityLow;
app.OpenCurrentDatabase(@"c:\dsdata\db3.mdb", false, string.Empty);
app.ExportXML(Microsoft.Office.Interop.Access.AcExportXMLObjectType
.acExportReport, "rptTest", @"c:\dsdata\XmlTest.xml", string.Empty,
string.Empty, string.Empty, Microsoft.Office.Interop.Access
.AcExportXMLEncoding.acUTF8, Microsoft.Office.Interop.Access
.AcExportXMLOtherFlags.acPersistReportML, string.Empty, null);
app.CloseCurrentDatabase();
}
}
}