Help with .XML files

10264
10
03-26-2015 11:22 AM
RogerDunn2
New Contributor II

I am a new GIS user.  I am looking for help to figure out how to transfer data which I received in .xml format to be able to use it in ArcGIS 10.2.2.  Is this possible?  The only thing I have attempted is to save the .xml file as a .txt file and then add it into my map as data.  The .txt file would not load.  It gives me the following message...

There was an error loading records.

The row contains a bad value. [OIDTable1]

The row contains a bad value. [F_xml_version_1_0_encoding_UTF_8__]

As stated I am new to GIS and I do not know programming language such as .xml

Any help or ideas would be greatly appreciate.

0 Kudos
10 Replies
JayantaPoddar
MVP Esteemed Contributor

Hi Roger,

You could try the following

In ArcCatalog, create a New File/personal geodatabase. Right-click the database > Import > XML Workspace document.

Select Data. Also specify the XML source to import

Hope it works!!!

Thanks,

Jay



Think Location
RogerDunn2
New Contributor II

Thank you Jayanta for you suggestion.  I attempted to do this and it gave me an error message stating:  AdvanceToElement: unable to find xml element (WorkspaceDefinition not found in xml doc). 

I am not sure what that means but I was unsuccessful.

What I am ultimately trying to figure out with all of this is 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 without needing to visually read the .XML and retype them in Notepad or Excel.

If you have any thought of how I can do this that would be great.

Thanks.

0 Kudos
JayantaPoddar
MVP Esteemed Contributor

Could you attach one of the xml files for reference?



Think Location
0 Kudos
RogerDunn2
New Contributor II

I would attach one if I could figure out how to attach it on this reply...I do not see a space to add an attachment.

0 Kudos
MattSnyder1
New Contributor II

Hi Roger,

I think Jayanta is on to something here.  It sounds like your XML is not conforming to the Geodatabase XML schema definition as defined here:

http://resources.arcgis.com/en/help/main/10.1/index.html#//018r00000005000000

It looks like if you use the Advanced Editor (little link at top right when creating a new post) then you will get an "Attach" option at the bottom right of the advanced editor.  Otherwise here's a quick way to check if your XML file is formatted properly.  If you open the XML document in a text editor you should see a format such as this:

<Workspace>

     <WorkspaceDefinition>

          ...(stuff in between)...

     </WorkspaceDefinition>

     <WorkspaceData>

          ...(stuff in between)...

     </WorkspaceData>

</Workspace>

Does your file look something like that?

Thanks,
Matt

0 Kudos
JayantaPoddar
MVP Esteemed Contributor

You can use the option of Advanced Editor. Then,



Think Location
0 Kudos
RogerDunn2
New Contributor II

Jayanta I do not even see the Advanced Editor option when I reply to you.  The only options I have available are the Bold, Italicize, Underline, Strikethrough, Unordered List, Ordered List, Insert Image, Insert Video, Insert Link, Emoticons, Quote Previous Message, and Toggle Spell Checker. 

0 Kudos
JayantaPoddar
MVP Esteemed Contributor



Think Location
0 Kudos
MattSnyder1
New Contributor II

It should be a link at the top right when you click reply that says "Use advanced editor".

0 Kudos