Any arg = new Any(new Type(XDocumentHandler.class), xDocHandWriter);
XInterface oExp = (XInterface)xMSF.createInstanceWithArguments(
"com.sun.star.comp." + docType + ".XML" + exportType + "Exporter",
new Object[] {arg});
XExporter xExp = (XExporter) UnoRuntime.queryInterface
(XExporter.class, oExp) ;
xExp.setSourceDocument(xDoc) ;
XFilter filter = (XFilter) UnoRuntime.queryInterface(XFilter.class, oExp) ;
filter.filter(XMLTools.createMediaDescriptor(
new String[] {"FilterName"},
new Object[] {"Custom filter"})) ;