Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

How can I handle the below error when I'm trying to add an XML file into ArcGIS for Desktop using ArcCatalog.

AdvanceToElement:Unable to find XML element (WorkspaceDefinition not found in XML doc)

XML files are provided by the client as a reference files to attach in our ArcMap, this is fist time we are using XML in ArcMap. Our ArcMap version is 10.1.

Please, remember that I'm very new to using xml files in arcmap.

    <?xml version="1.0" ?> 
- <INVENTORY>
- <ATTACHMENT>
  <REF_TYPE>NONE</REF_TYPE> 
  <ANCILLARYROLE>0</ANCILLARYROLE> 
  <ATTACHMENT_NAME>SLACK:FIB::961</ATTACHMENT_NAME> 
  <ATTACHMENT_REF_NAME>20m</ATTACHMENT_REF_NAME> 
  <CATEGORY_NAME>SLACK-E</CATEGORY_NAME> 
  <ENABLED>1</ENABLED> 
  <INVENTORY_STATUS_CODE>IPL</INVENTORY_STATUS_CODE> 
  <LENGTH_ADJUSTMENT>20</LENGTH_ADJUSTMENT> 
  <MODEL_UUID>{2937E405-1E38-42F9-991B-4AAA4A6DED77}</MODEL_UUID> 
  <MODIFICATION_IND>0</MODIFICATION_IND> 
  <Q_CREATE_WORK_ORDER>TCA_10_4_base_data</Q_CREATE_WORK_ORDER> 
  <REF_UUID>{5E60CBAE-C234-4A1A-B132-4CAC48AF1FC4}</REF_UUID> 
  <ROTATION>0</ROTATION> 
  <GEOMETRY>X="230483.90725" Y="395726.049"</GEOMETRY> 
  <TRANSMEDIA_NAME>FIB-Q:48F::6406</TRANSMEDIA_NAME> 
  <TYPE_NAME>FIBER</TYPE_NAME> 
  <UUID>{ACBBDD7D-1DA1-4F75-84BB-803DB4B04C9B}</UUID> 
  </ATTACHMENT>
- <ATTACHMENT>
  <REF_TYPE>NONE</REF_TYPE> 
  <ANCILLARYROLE>0</ANCILLARYROLE> 
  <ATTACHMENT_NAME>SLACK:FIB::962</ATTACHMENT_NAME> 
  <ATTACHMENT_REF_NAME>20m</ATTACHMENT_REF_NAME> 
  <CATEGORY_NAME>SLACK-E</CATEGORY_NAME> 
  <ENABLED>1</ENABLED> 
  <INVENTORY_STATUS_CODE>IPL</INVENTORY_STATUS_CODE> 
  <LENGTH_ADJUSTMENT>20</LENGTH_ADJUSTMENT> 
  <MODEL_UUID>{2937E405-1E38-42F9-991B-4AAA4A6DED77}</MODEL_UUID> 
  <MODIFICATION_IND>0</MODIFICATION_IND> 
  <Q_CREATE_WORK_ORDER>TCA_10_4_base_data</Q_CREATE_WORK_ORDER> 
  <REF_UUID>{5E60CBAE-C234-4A1A-B132-4CAC48AF1FC4}</REF_UUID> 
  <ROTATION>0</ROTATION> 
  <GEOMETRY>X="230583.2762" Y="395795.57475"</GEOMETRY> 
  <TRANSMEDIA_NAME>FIB-Q:48F::6406</TRANSMEDIA_NAME> 
  <TYPE_NAME>FIBER</TYPE_NAME> 
  <UUID>{6BB5FB19-B6A5-4DC0-8657-F5B1D76F1757}</UUID> 
  </ATTACHMENT>
  </INVENTORY>

enter image description here

share|improve this question
    
Have you figured this out yet I am having the same problem –  user23232 Oct 23 '13 at 21:54
    
This isn't an answer. If you want to add a comment, please do so below the question. –  BradHards Oct 24 '13 at 0:07
    
This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. You can also add a bounty to draw more attention to this question once you have enough reputation. –  Paul Oct 24 '13 at 0:07
    
If the file which you tried to import was actually an XMI file, then since XMI files appear in Windows with the .xml file extension, it is easy to make this mistake with them. –  user23658 Nov 5 '13 at 22:54

1 Answer 1

You have made the incorrect assumption that all XML is created equal. XML is a markup language, not a strictly-defined data exchange format, and can contain practically anything. The software that reads the XML needs to know what to do with its contents. In this case, the software (ArcGIS) does not understand the contents of your XML file.

The reason for the error is not that no XML schema (XSD) file is present, but that you are simply doing something that is not supported by the software.

XML Workspace Documents are an ESRI-designed "flavor" of XML specifically intended for the exchange ESRI geodatabases. ArcGIS knows how to read and write these files, but only if they are in the expected format.

Since your XML data is not an ESRI XML Workspace document, you will have to come up with a different solution. What you use depends on what you need to do with the data (please elaborate), but one possibility that comes to mind might be to use Python (using one of the many available XML libraries such as ElementTree or lxml) to read the XML file contents and create a table or feature class with arcpy.

A more direct solution might be to ask your client to deliver the data in a format ArcGIS can work with out of the box.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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