Continution of .XML file extraction

4980
1
03-27-2015 01:07 PM
RogerDunn2
New Contributor II

am attempting figure out how to use an .XML document in ArcGIS 10.2.2.  Can it be used or what would I need to do to make it useable?

I am trying to figure out how to quickly and easily extract XY coordinates out of an .XML document.  I only need the XY coordinates from the document so I can create a Shapefile representing these coordinates on my map.  I need to figure out a way to get this information out of about 11,000 individual .XML documents thus the quick and easy part.  The only way I know to get the data is to visually read the .XML and retype them in Notepad or Excel.  This is neither quick or easy.

If anyone has any thoughts of how I can do this that would be great.

0 Kudos
1 Reply
MattSnyder1
New Contributor II

Hi Roger,

I took a look at the XML and the reason it's not loading into ArcDesktop is because it doesn't match the Geodatabase XML schema.  A couple options come to mind for getting this into a shape file:

1. Use XSLT to transform this XML into Geodatabase XML schema format.  Then you can manually load them using ArcDesktop as mentioned in the original thread.

2. Write a Python script to read the XML files, parse them for the lat/long and create shapes from that.

I would recommend Option #2 since you mentioned there are thousands of files.  With this option you could create a very nice automated process which picks up those files, parses them and creates all the shapes you need with only one or two clicks.  Even more so, if this is a process that you need to perform more than once.

You also mentioned that you're new to development.  I am a software development consultant and would be happy to help you implement this if you want to go that direction.

Thanks,
Matt