Using arcpy.ExportMetadata_conversion?

I've had better success using the XSLTransform_conversion operation in my Python geoprocessing scripts. There are a few ESRI-supplied XSL files in the C:\Program Files\ArcGIS\ArcToolBox\Stylesheets directory (on a 32-bit machine). Here's an example of the line using the XSL transform I used in a python script I published to ArcGIS Server:

results = gp.XSLTransform_conversion(inputFC, xslFile, outputFileName)

This returns a formatted file. I chose to have HTML as an output, but it will output XML if you want.


You have to use the 32-bit version of python. I know this is an old post but someone might stumble on it looking for an answer. See https://geonet.esri.com/thread/94637.