Import XML fails on Exported XML file: "001162 : Invalid XML file"

477
5
Jump to solution
08-04-2021 03:47 PM
Labels (3)
JoeBryant1
Occasional Contributor II

I am attempting to import a SCHEMA only XML from an existing file geodatabase to a new, empty file geodatabase that I created. I get the error 001162 : Invalid XML file.

I have freshly exported this schema-only XML from the existing FGDB using the Export XML GP tool in ArcCatalog 10.7.1.  It is not zipped and is stored as BINARY (default).

When I try to Import XML to the new, empty FGDB as schema-only, I get the above error that the XML is invalid. I have tried both the GP tool and the wizard (right-click -> import).

I have also tried exporting the initial XML using the XRay add-in, but this makes no difference.

The source FGDB is from an ArcGIS Online feature service I published a few years ago and exported to a FGDB yesterday. I have already deleted the "GDB_ServiceItems" table from the exported FGDB, but this made no difference.

Inspecting the XML seems to indicate it is formatted in the ESRI XML format (sample of the header below):

 

<esri:Workspace xmlns:esri='http://www.esri.com/schemas/ArcGIS/10.7' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xs='http://www.w3.org/2001/XMLSchema'><WorkspaceDefinition xsi:type='esri:WorkspaceDefinition'><WorkspaceType>esriLocalDatabaseWorkspace</WorkspaceType><Version></Version>...

 

 

0 Kudos
1 Solution

Accepted Solutions
JoeBryant1
Occasional Contributor II

I ended up inspecting the XML further with XRay to look for anything out of the ordinary. When I validated the XML it indicated there were issues with the domains that had been created/updated in ArcGIS Online. I deleted domains that only had a single coded value, and renamed them to remove the Global ID that ArcGIS Online adds to the name. After these changes, I was able to use XRay to import the XML schema to a new file geodatabase successfully.

FYI: This does disable your attachment relationship classes, but preserves the other relationship classes. But it is fairly easy to just reenable your feature classes and tables for attachments after they are created.

Takeaway - clean up any domains that were created in ArcGIS Online when you export to a FGDB.

View solution in original post

5 Replies
Brian_McLeer
Occasional Contributor II

Hi @JoeBryant1 , might it have to do with the version of the source FGDB coming from AGOL? Could you do a second transfer to have the FGDB be on 10.7 level? Maybe it thinks the AGOL FGDB is a newer version. 

Brian
0 Kudos
JoeBryant1
Occasional Contributor II

Hi Brian. I can't find a way to chose the version of FGDB that AGOL uses when you export a hosted feature class. The metadata on the item page also doesn't give me any info on the version of the GDB.

Viewing the GDB properties in ArcMap just says that the GDB matches my current version of Arc (10.7.1) and can't be upgraded.

I attempted to export the feature class using ArcMap instead of AGOL (as shown here), hoping that would force the FGDB to my current version. However, this continually fails with any name in any location. This may be related (or not).

JoeBryant1_0-1628201365104.png

 

0 Kudos
JoeBryant1
Occasional Contributor II

I was able to get around the Export Data wizard error by using "Feature Class to Feature Class" GP tool. Still no option to select the GDB version, but I shouldn't be able to save in a higher version from 10.7.1.

Comparing the GDB feature class exported with Arc to the one exported with AGOL, the AGOL version correctly preserved the _ATTACH table and relationship class, plus the Inspection table and relationship class. The ArcMap export only persevered the _ATTACH table and relationship. Thus, the ArcMap export does not help me.

Are there restrictions on the number of relationship classes that I am running up against?

0 Kudos
JoeBryant1
Occasional Contributor II

I ended up inspecting the XML further with XRay to look for anything out of the ordinary. When I validated the XML it indicated there were issues with the domains that had been created/updated in ArcGIS Online. I deleted domains that only had a single coded value, and renamed them to remove the Global ID that ArcGIS Online adds to the name. After these changes, I was able to use XRay to import the XML schema to a new file geodatabase successfully.

FYI: This does disable your attachment relationship classes, but preserves the other relationship classes. But it is fairly easy to just reenable your feature classes and tables for attachments after they are created.

Takeaway - clean up any domains that were created in ArcGIS Online when you export to a FGDB.

View solution in original post

Brian_McLeer
Occasional Contributor II

Glad it worked out, I have not used XRay but good to know if I do in the future. 

Brian
0 Kudos