<?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: AGOL Services' Item Description: 'The item's XML contains errors.' in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/agol-services-item-description-the-item-s-xml/m-p/427999#M21603</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any success with this? I am experiencing the same issue.&lt;/P&gt;&lt;P&gt;It would be great to get an example on how to upload metadata files to AGOL.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Jan 2016 23:42:34 GMT</pubDate>
    <dc:creator>SusanMinnemeyer1</dc:creator>
    <dc:date>2016-01-19T23:42:34Z</dc:date>
    <item>
      <title>AGOL Services' Item Description: 'The item's XML contains errors.'</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/agol-services-item-description-the-item-s-xml/m-p/427995#M21599</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When people connect to my organization's AGOL hosted services via a GIS Server connection in ArcMap (e.g. &lt;A href="http://services1.arcgis.com/O1JpcwDW8sjYuddV/ArcGIS/rest/services" title="http://services1.arcgis.com/O1JpcwDW8sjYuddV/ArcGIS/rest/services"&gt;http://services1.arcgis.com/[Group ID #]/ArcGIS/rest/services&lt;/A&gt; , the 'Item Description' returns the error message 'The item's XML contains errors.'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BUT, the metadata/item details display fine when viewed via AGOL, ArcMap's Add Data AGOL search, and through the 'My Hosted Services' connection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance,&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ps: Several of ESRI's services seem to have this same 'Item Description' problem (but some of theirs work) when accessed via a server connection in ArcMap:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="AGOL_XML_error.jpg" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/117568_AGOL_XML_error.jpg" style="width: 620px; height: 264px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jul 2015 15:40:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/agol-services-item-description-the-item-s-xml/m-p/427995#M21599</guid>
      <dc:creator>MichaelNesius</dc:creator>
      <dc:date>2015-07-16T15:40:37Z</dc:date>
    </item>
    <item>
      <title>Re: AGOL Services' Item Description: 'The item's XML contains errors.'</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/agol-services-item-description-the-item-s-xml/m-p/427996#M21600</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may want to move this question to an ArcGis Online groups&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jul 2015 15:45:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/agol-services-item-description-the-item-s-xml/m-p/427996#M21600</guid>
      <dc:creator>WesMiller</dc:creator>
      <dc:date>2015-07-16T15:45:56Z</dc:date>
    </item>
    <item>
      <title>Re: AGOL Services' Item Description: 'The item's XML contains errors.'</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/agol-services-item-description-the-item-s-xml/m-p/427997#M21601</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I noticed the new Metadata feature on AGOL, thanks ESRI!! While it is great that we can manually upload ArcGIS formatted .xml metadata...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Has anyone had success uploading an XML through REST/python script to an AGOL hosted service?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Based on my reading of the REST API documentation, it should be possible with an update item operation. I've been attempting this for a while without any luck. Any suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My most recent variation (using requests):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;def uploadMeta():
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; baseURL= agol.http+'/content/users/{}/items/{}/update'.format(agol.username, agol.itemID)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; metaUp = {"file": open(updatedXML, 'rb')}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; updatemetaurl = baseURL + "?f=json"+\
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "&amp;amp;file=metadata.xml"+"&amp;amp;overwrite=true&amp;amp;token="+agol.token
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; responseMeta = requests.post(updatemetaurl, files=metaUp, proxies=proxyDict)&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this returns a &amp;lt;Response[200]&amp;gt;&amp;nbsp; and response text:{u'id': u'4b99244d8df34ffba9c7ddf1dc20ea88', u'success': True} BUT the metadata isn't updated. I can use the AGOL UI to manually update the metadata, but I need a way to automate. Any help would be great appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the updatemetaurl I'm using here ends up looking like this:&lt;/P&gt;&lt;P&gt;&lt;A class="unlinked" title="http://www.arcgis.com/sharing/rest/content/users/sm970mn/items/4b99244d8df34ffba9c7ddf1dc20ea88/update?f=json&amp;amp;&amp;amp;file=metadata.xml&amp;amp;overwrite=true&amp;amp;token=q2IMhjG1YtSQ9csq632AG3I8pEDXMlPqQ19Y_OIEL06uw7hsJKmw6CfZmRAHxCF48_l2gTc7qYVefWJfFty5sXK-_RuU-OpEbe3H93unPiCSIRbEoOpkCqtylWkRDf9coy-APr46vfNd2bD0QfUoUA.." target="_blank"&gt;http://www.arcgis.com/sharing/rest/content/users/sm970mn/items/4b99244d8df34ffba9c7ddf1dc20ea88/update?f=json&amp;amp;file=metadata.xml&amp;amp;overwrite=true&amp;amp;token=q2IMhjG1YtSQ9csq...&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 19:15:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/agol-services-item-description-the-item-s-xml/m-p/427997#M21601</guid>
      <dc:creator>MichaelNesius</dc:creator>
      <dc:date>2021-12-11T19:15:53Z</dc:date>
    </item>
    <item>
      <title>Re: AGOL Services' Item Description: 'The item's XML contains errors.'</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/agol-services-item-description-the-item-s-xml/m-p/427998#M21602</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm uploading/updating/publishing services via service definitions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since .sd files only support the basic item description, the metadata carried with the sd when it is published is also truncated. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2015 15:28:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/agol-services-item-description-the-item-s-xml/m-p/427998#M21602</guid>
      <dc:creator>MichaelNesius</dc:creator>
      <dc:date>2015-08-07T15:28:12Z</dc:date>
    </item>
    <item>
      <title>Re: AGOL Services' Item Description: 'The item's XML contains errors.'</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/agol-services-item-description-the-item-s-xml/m-p/427999#M21603</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any success with this? I am experiencing the same issue.&lt;/P&gt;&lt;P&gt;It would be great to get an example on how to upload metadata files to AGOL.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jan 2016 23:42:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/agol-services-item-description-the-item-s-xml/m-p/427999#M21603</guid>
      <dc:creator>SusanMinnemeyer1</dc:creator>
      <dc:date>2016-01-19T23:42:34Z</dc:date>
    </item>
  </channel>
</rss>

