enter image description here

I have never used xml data imports.

I am working with ArcGIS desktop 10.2

One of our major data supplier started data delivery using XML format using FTP. Packets of data updates are coming every day through FTP and stored in SQL.

I am looking for best practice to import data into geodatabases.

I have already used FME which has many shortcomings and I am not satisfied as its a lengthy process to write geometries. Also Importing XML to ArcMAP endup with error (AdvanceToElement: Unable to find xml element (workspaceDefinition not found in xml doc))

  • 1
    Is it an XML workspace or XML recordset document? Jan 14, 2015 at 0:31
  • can you give an example of the xml structure - fme is very powerful extracting xml elements yes it can take time to set up the workbench workspace but you will be able to batch it.
    – Mapperz
    Jan 14, 2015 at 1:17
  • It is an XML recordset document. I can provide a snapshot from xml document. Where can I attach for you ?
    – GurminderS
    Jan 14, 2015 at 1:46
  • paste it into your question or add a screenshot (image)
    – Mapperz
    Jan 14, 2015 at 2:35
  • 1
    Attaching files to Q&As here has been requested but most of us think that it would be a feature not normally needed and subject to frequent over use: meta.stackexchange.com/q/4637
    – PolyGeo
    Jan 14, 2015 at 2:41

1 Answer 1


You can certainly use FME to wrangle the XML and write it to a database.

Something for you to understand first is that GIS like flat data with rows and columns, including geometry. XML is not flat, it is a (maybe big) hierarchical tree, which is a fundamentally different data model than most GIS formats. That said, you can parse the XML and extract all the bits you want.

Here's what I suggest you do:

  1. Open the XML file that was delivered in a good text editor, like Notepad++, and inspect the structure. Ensure that you can identify the attributes you want and the geometry
  2. Read up on some kind of help document that tells you how to use FME to wrangle XML files, maybe this one, or this one, or this video.
  3. Now get FME to read that file, use the inspector to ensure you're reading it properly, and when it's right, write it our to file.

If you like programming, you could do the above with Python, and then you could make and ArcGIS tool to import the data for you.

This task that you have, although frustrating at first, is one of the most important parts of doing GIS! You need to get data from somewhere to somewhere else, and getting it out of some weird arbitrary format is normal.

Edit: use a GeometryReplacer in FME to make the attribute with WKT or GML or whatever into a proper geometry.

Geometry Replacer

  • Thanks Alex, this would help to move ahead. Using 'feature path' in FME and 'flatenning' I am able to transform, but resulting dataset gives different (FME generated) attributes, without geometry. So struggling to reach success.
    – GurminderS
    Jan 14, 2015 at 0:37
  • You may need to extract the geometry from a text field, can you see geometry in the original file?
    – Alex Leith
    Jan 14, 2015 at 1:04
  • Yes Alex, I can read an attribute value as 'multipolygon'. where can I attach a snapshot from XML document for better understanding please
    – GurminderS
    Jan 14, 2015 at 1:47
  • If it's like mulitpolygon((numbers, numbers, numbers..)..) then it's (likely to be) WKT. I can't say for a certainty but FME should be able to translate it as it's a very common interchange/storage format; Many APIs including Esri and OGR have fromWKT geometry methods... at least though there's a name to Google by. Jan 14, 2015 at 2:54
  • 1
    That's right, @MichaelMiles-Stimson, you can use a GeometryReplacer in FME to make geometry from an attribute field.
    – Alex Leith
    Jan 14, 2015 at 3:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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