[GIS] Error importing XML workspace document to file geodatabase

arcgis-10.0enterprise-geodatabasefile-geodatabasegeodatabase-xmlimport

Ok so I have a large SDE geodatabase that I exported to an XML Workspace Document. I tried to importing it again into a file geodatabase to test if the export worked correctly and got the following error:

Import xml data failed  
FDO error: -2147186428  
[XML parse error: Illegal xml character  
[Line: 23612914, column: 1043].]

Could this be from an invalid character somewhere in my data? Is there a list of invalid characters for XML workspace documents? And is there an easy way to get to the line and column in the error message to see what it is?

Also are there any file size limitations, my XML is nearly 12gb? Or could it be possible there was just an error in the exporting process?

Best Answer

That sounds like a lot of data to be storing in XML, which is an uncompressed format. Have you considered using the schema only option, and are you using binary or plain text storage if you are exporting data as well? Alternatively you might see if geodatabase replication, geoprocessing tools, or even a simple copy/paste might work better for your scenario.

As for the error message, since you know the line number you could use the sed command from gnuwin32 or unxutils (I recommend this one for easier setup) to get just the one line:

sed -e "1,N d; M q" path_to_file.xml > c:\output.txt

Open up a command window (Start-Run, enter cmd, click OK) and enter the above command.

This grabs the lines between N+1 and M and pipes it to c:\output.txt, which you can then open with any text editor.

Alternatively Large Text File Viewer seems to have been recommended a lot on StackOverflow and may be up to the task.

You might also see this question which has some information about file geodatabases and codepages, probably the crux of the issue: ESRI File GeoDatabase: Unicode/Codepage problem - Convert UTF-8 to ANSI