I need to create a solution for non-technical people to export data from an ArcMAP document (.mxd) to XML files. I will need each feature's data to be exported in such a way that the output xml file (or could be an Excel file) contains both spatial and non-spatial attributes.
The only I put I see which has the required data is a Google Earth .kmz file. Now, I have been able to convert the .kmz to .kml using some .NET code but the final .kml file is too unstructured to be parsed by my .NET code.
I have tried xToolsPro and they do directly output to .kml file but that doesn't good either–and costs $250 for the license (the export function will expire after the trial).
So what are my options? Could I program some Python script and create some extension to Arctoolbox?
I am stuck! Can't believe this kind of functionally is not built-in (export to xml including Shape data).
Best Answer
ESRI has an standard xml format to export both the data and the schema of data.
In ArcCatalg (Catalog window of Arcmap):
1- As arcgis cannot export shapefile directly to XML workspace first import your shapefile into a geodatabase featureclass.
2- right-click the featureCLass > Export> XML Workspace Document
in the opened window there are two combo boxes. select like this snapshot:
I hope it helps.
Update: kmz is the compression format for kml file (like zip format). You need to just extract the kmz to kml using winrar or winzip. Furthermore ArcGIS has a tool to convert a layer including shapefile layer to KMZ (no extra cost!). The Geoprocessing tool name is "Layer to KML".