<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Python script to export Geodatabase to XML Workspace ? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/python-script-to-export-geodatabase-to-xml/m-p/370129#M29272</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you wanted pure-Python automation through the File Geodatabase API, this is now possible.&amp;nbsp; See my post:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://libjoe.blogspot.com/2014/02/python-wrapper-for-esri-file.html"&gt;http://libjoe.blogspot.com/2014/02/python-wrapper-for-esri-file.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can also check out the project page here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="https://code.google.com/p/file-geodatabase-api-python-wrapper/"&gt;https://code.google.com/p/file-geodatabase-api-python-wrapper/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Enjoy!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Joseph Armbruster&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 02 Feb 2014 05:00:26 GMT</pubDate>
    <dc:creator>JosephArmbruster</dc:creator>
    <dc:date>2014-02-02T05:00:26Z</dc:date>
    <item>
      <title>Python script to export Geodatabase to XML Workspace ?</title>
      <link>https://community.esri.com/t5/python-questions/python-script-to-export-geodatabase-to-xml/m-p/370124#M29267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Anyone know if there is a Python script to export a Geodatabase (data and schema) to an XML Workspace Document ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I need to export several Personal Geodatabases to File Geodatabases.&amp;nbsp; The ArcCatalog Export &amp;gt; XML Workspace Document tool takes a long time for large Geodatabases, and I'd like to Automate this to run several exports overnight.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Feb 2011 18:17:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-to-export-geodatabase-to-xml/m-p/370124#M29267</guid>
      <dc:creator>MiguelGarriga1</dc:creator>
      <dc:date>2011-02-18T18:17:54Z</dc:date>
    </item>
    <item>
      <title>Re: Python script to export Geodatabase to XML Workspace ?</title>
      <link>https://community.esri.com/t5/python-questions/python-script-to-export-geodatabase-to-xml/m-p/370125#M29268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Currently the only way that I know of to do this using Python is through comtypes and ArcObjects. See this thread (and linked threads) on GIS StackExchange for an introduction and some useful wrapper code: &lt;/SPAN&gt;&lt;A href="http://gis.stackexchange.com/questions/80/how-do-i-access-arcobjects-from-python"&gt;http://gis.stackexchange.com/questions/80/how-do-i-access-arcobjects-from-python&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You could also try this .NET console application (may have to adjust source code for license initialization in ArcGIS 10 and recompile). It's a command line app that you could then call from Python, once for each GDB you want to export. &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/gallery/file/arcobjects-net-api/details?entryID=A9BACE36-1422-2418-3452-81420C394B9A"&gt;http://resources.arcgis.com/gallery/file/arcobjects-net-api/details?entryID=A9BACE36-1422-2418-3452-81420C394B9A&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you can wait for ArcGIS 10.1, there are supposedly going to be new import and export XML tools, according to this ArcGIS Ideas post: &lt;/SPAN&gt;&lt;A href="http://ideas.arcgis.com/ideaView?id=087300000008G2xAAE"&gt;http://ideas.arcgis.com/ideaView?id=087300000008G2xAAE&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Feb 2011 15:21:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-to-export-geodatabase-to-xml/m-p/370125#M29268</guid>
      <dc:creator>LoganPugh</dc:creator>
      <dc:date>2011-02-22T15:21:45Z</dc:date>
    </item>
    <item>
      <title>Re: Python script to export Geodatabase to XML Workspace ?</title>
      <link>https://community.esri.com/t5/python-questions/python-script-to-export-geodatabase-to-xml/m-p/370126#M29269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Miguel&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I wanted to find out from you if you came right in being able to automate (python script) to export a geodatabase schema and data to XML?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Apr 2012 12:27:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-to-export-geodatabase-to-xml/m-p/370126#M29269</guid>
      <dc:creator>PeterWilson</dc:creator>
      <dc:date>2012-04-27T12:27:32Z</dc:date>
    </item>
    <item>
      <title>Re: Python script to export Geodatabase to XML Workspace ?</title>
      <link>https://community.esri.com/t5/python-questions/python-script-to-export-geodatabase-to-xml/m-p/370127#M29270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi Miguel&lt;BR /&gt;&lt;BR /&gt;I wanted to find out from you if you came right in being able to automate (python script) to export a geodatabase schema and data to XML?&lt;BR /&gt;&lt;BR /&gt;Regards&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I did not pursue the python automation of XML export.&amp;nbsp; Exported the data manually instead.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Apr 2012 12:51:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-to-export-geodatabase-to-xml/m-p/370127#M29270</guid>
      <dc:creator>MiguelGarriga1</dc:creator>
      <dc:date>2012-04-27T12:51:52Z</dc:date>
    </item>
    <item>
      <title>Re: Python script to export Geodatabase to XML Workspace ?</title>
      <link>https://community.esri.com/t5/python-questions/python-script-to-export-geodatabase-to-xml/m-p/370128#M29271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Miguel&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Apr 2012 13:50:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-to-export-geodatabase-to-xml/m-p/370128#M29271</guid>
      <dc:creator>PeterWilson</dc:creator>
      <dc:date>2012-04-27T13:50:49Z</dc:date>
    </item>
    <item>
      <title>Re: Python script to export Geodatabase to XML Workspace ?</title>
      <link>https://community.esri.com/t5/python-questions/python-script-to-export-geodatabase-to-xml/m-p/370129#M29272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you wanted pure-Python automation through the File Geodatabase API, this is now possible.&amp;nbsp; See my post:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://libjoe.blogspot.com/2014/02/python-wrapper-for-esri-file.html"&gt;http://libjoe.blogspot.com/2014/02/python-wrapper-for-esri-file.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can also check out the project page here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="https://code.google.com/p/file-geodatabase-api-python-wrapper/"&gt;https://code.google.com/p/file-geodatabase-api-python-wrapper/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Enjoy!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Joseph Armbruster&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 Feb 2014 05:00:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-to-export-geodatabase-to-xml/m-p/370129#M29272</guid>
      <dc:creator>JosephArmbruster</dc:creator>
      <dc:date>2014-02-02T05:00:26Z</dc:date>
    </item>
    <item>
      <title>Re: Python script to export Geodatabase to XML Workspace ?</title>
      <link>https://community.esri.com/t5/python-questions/python-script-to-export-geodatabase-to-xml/m-p/370130#M29273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Am I missing something here?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Why wouldn't you be able to use the &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//00170000015s000000" rel="nofollow noopener noreferrer" target="_blank"&gt;'ExportXMLWorkspaceDocument_management()'&lt;/A&gt;&lt;SPAN&gt; function in arcpy?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To export the schema with the data contents, just set the export_type argument to 'Data'.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
MyGDB = r"C:\MyGIS\MyGDB.gdb"
ResultXML = r"C:\MyGIS\MyGDBXML.xml"
arcpy.ExportXMLWorkspaceDocument_management (MyGDB, ResultXML, "DATA", "BINARY", METADATA)
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you need to do this for a bunch of GDBs, then just populate them all in a list and loop through the list.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 17:09:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-to-export-geodatabase-to-xml/m-p/370130#M29273</guid>
      <dc:creator>JohnDye</dc:creator>
      <dc:date>2021-12-11T17:09:23Z</dc:date>
    </item>
  </channel>
</rss>

