I am attempting to use XML files, for example Google places API extracted XML files, in ArcGIS 10.4/10.5, and have yet to find an easy way to do so. I do not know what type of XML file it is exactly, I do know that it contains longitude/latitude data. I have attached a pic of the start of the code, if that helps to identify.

enter image description here

So far I have succeeded to convert an XML file to a shapefile through the Add X,Y feature in ArcGIS which turns the file into an Excel file, and then using the FME converting software to convert the Excel file into a working shapefile. This is a rather long way, and takes some time if I want to work with a large number of XML files.

Is there an easier way to do so? Otherwise, is there an easier way to work on spatial features with XML files than ArcGIS?

  • 4
    There are, approximately, a billion different XML formats. Please Edit your question to specify the exact file specification (KML, perhaps?), and the exact ArcGIS release, since "ArcGIS 10" is a series of families, ranging from the retired 10.0 to the current 10.5.0. – Vince May 8 '17 at 11:01
  • looks like KML format - you can rename to .kml and load them into ArcGIS? – Mapperz May 9 '17 at 14:14

Well, since you have FME I would suggest using that to convert the XML directly to a Geodatabase or Shapefile.

Use FME Workbench and generate a workspace. For the Reader set the format to XML and choose the datafile. Click the Parameters button.

Under parameters click the browse button next to Elements to Match and choose the header element (probably PlaceSearchResponse in your case).

Set the Writer to be Geodatabase or Shapefile.

When the workspace is created the XML should be "flattened" into attributes; i.e. you should get attributes like PlaceSearchRespose.Result.Geometry.Lat/Lng (or similar).

You can use a VertexCreator transformer to turn those attributes into geometric features. You'll also want to check the writer feature type parameters to make sure the table/layer is expecting the right geometry (points).

Then run the translation.

(Quick demo, bearing in mind I don't have the right dataset: https://screencast.com/t/SUGcQ20sQFOc)

Since you have both FME and ArcGIS, you could also activate the FME Extensions in ArcGIS, and carry out the above fully in ArcGIS using a Spatial ETL Model instead of an FME Workspace. See the FME documentation (especially the Data Interoperability Extension) for how to do that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.