Is it possible to export shapefiles or rasters in XML file format from ArcGIS for Desktop?
Data needs to located in a geodatabase in order to export to XML. You can do this manually, or use the tool Export XML Workspace Document (Data Management). For the manual approach, simply right-click the featureclass or raster dataset within the file geodatabase > Export > XML Workspace Document.
Which then brings up the following GUI, where you can specify the export
If you have the Data Interoperability extension (paid license) you can export vector data (i.e. shapefiles) to the GML simple features (GML-SF) xml profile.
A free and open source option is to use the
ogr2ogr command-line utility from the GDAL/OGR project. i.e.
ogr2ogr -f GML somevectors.gml somevectors.shp. You can install GDAL/OGR from the GIS Internals site or by using the OSGEO4W installer.