<?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: Map Service properties (arcpy): Error parsing recycleInterval, recycleStartTime, keepAliveInterval in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/map-service-properties-arcpy-error-parsing/m-p/184568#M7360</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;After searching a long time the answer found:&lt;/P&gt;&lt;P&gt;change your line:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;if&lt;/SPAN&gt;&amp;nbsp;key.firstChild.data&amp;nbsp;==&amp;nbsp;&lt;SPAN class=""&gt;"{}"&lt;/SPAN&gt;.format(recycleStartTime)&amp;nbsp;:&amp;nbsp;key.nextSibling.firstChild.data&amp;nbsp;=&amp;nbsp;&lt;SPAN class=""&gt;'04:00'&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;to:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if key.firstChild.data == &lt;SPAN class=""&gt;"{}"&lt;/SPAN&gt;.format(recycleStartTime)&amp;nbsp;: &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp; key.nextSibling.firstChild == None:&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; x = doc.createTextNode("04:00") &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; key.nextSibling.appendChild(x)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Jul 2017 14:21:24 GMT</pubDate>
    <dc:creator>Huub_vanAmelsvoort</dc:creator>
    <dc:date>2017-07-14T14:21:24Z</dc:date>
    <item>
      <title>Map Service properties (arcpy): Error parsing recycleInterval, recycleStartTime, keepAliveInterval</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/map-service-properties-arcpy-error-parsing/m-p/184560#M7352</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #242729; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-size: 15px; background-color: rgba(248, 248, 248, 0.6);"&gt;Need to publish web service using arcpy tuning up its properties through the &lt;/SPAN&gt;&lt;SPAN style="font-size: 15px; color: #242729; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;&lt;STRONG&gt;parameter names &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #242729; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-size: 15px; background-color: rgba(248, 248, 248, 0.6);"&gt;passing them into function parameter_toggle (see code bellow). We are getting error (see picture bellow) in the parse of XML (output of sddraft analysis) with &lt;STRONG&gt;xml.dom.minidom&lt;/STRONG&gt; for the parameters:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- "&lt;STRONG&gt;recycleInterval&lt;/STRONG&gt;"&lt;/P&gt;&lt;P&gt;- "&lt;STRONG&gt;recycleStartTime&lt;/STRONG&gt;"&lt;/P&gt;&lt;P&gt;- "&lt;STRONG&gt;keepAliveInterval&lt;/STRONG&gt;"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These parameters represent service properties:&lt;/P&gt;&lt;P&gt;Specify Recycling Settings:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - Recycle this configuration every&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - Starting at&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Specify Health Check Settings:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - Check and repair instances every&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="kwd" style="color: #101094;"&gt;def&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; mapService&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;wrkspc&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; con&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; service&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;):&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;
&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;...&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;
&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #101094;"&gt;return&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;sddraft&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; analysis&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; &lt;/SPAN&gt;&lt;SPAN class="com" style="color: #858c93;"&gt;# (out_sddraft, out_analysis)&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;

&lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #101094;"&gt;def&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; capability_toggle&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;doc&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; server_type&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; status&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;):&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;
&amp;nbsp; type_names &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; doc&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;getElementsByTagName&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="str" style="color: #7d2727;"&gt;'TypeName'&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;
&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #101094;"&gt;for&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; type_name &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #101094;"&gt;in&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; type_names&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;:&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;
&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #101094;"&gt;if&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; type_name&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;firstChild&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;data &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;==&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; &lt;/SPAN&gt;&lt;SPAN class="str" style="color: #7d2727;"&gt;"{}"&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;format&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;server_type&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #101094;"&gt;and&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; status&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;lower&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;()&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;==&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; &lt;/SPAN&gt;&lt;SPAN class="str" style="color: #7d2727;"&gt;'on'&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;:&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;
&amp;nbsp; type_name&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;parentNode&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;getElementsByTagName&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="str" style="color: #7d2727;"&gt;"Enabled"&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;)[&lt;/SPAN&gt;&lt;SPAN class="lit" style="color: #7d2727;"&gt;0&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;].&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;firstChild&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;data &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; &lt;/SPAN&gt;&lt;SPAN class="str" style="color: #7d2727;"&gt;"true"&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;

&lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #101094;"&gt;def&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; parameter_toggle&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;doc&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="str" style="color: #7d2727;"&gt;'maxRecordCount'&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; &lt;/SPAN&gt;&lt;SPAN class="str" style="color: #7d2727;"&gt;'MaxInstances'&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; &lt;/SPAN&gt;&lt;SPAN class="str" style="color: #7d2727;"&gt;'recycleInterval'&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; &lt;/SPAN&gt;&lt;SPAN class="str" style="color: #7d2727;"&gt;'recycleStartTime'&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; &lt;/SPAN&gt;&lt;SPAN class="str" style="color: #7d2727;"&gt;'keepAliveInterval'&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;):&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;
&amp;nbsp; keys &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; doc&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;getElementsByTagName&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="str" style="color: #7d2727;"&gt;'Key'&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;
&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #101094;"&gt;for&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; key &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #101094;"&gt;in&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; keys&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;:&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;
&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #101094;"&gt;if&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; key&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;firstChild&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;data &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;==&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; &lt;/SPAN&gt;&lt;SPAN class="str" style="color: #7d2727;"&gt;"{}"&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;format&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;maxRecordCount&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;:&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; key&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;nextSibling&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;firstChild&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;data &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; &lt;/SPAN&gt;&lt;SPAN class="lit" style="color: #7d2727;"&gt;100000&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;
&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #101094;"&gt;if&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; key&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;firstChild&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;data &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;==&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; &lt;/SPAN&gt;&lt;SPAN class="str" style="color: #7d2727;"&gt;"{}"&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;format&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="typ" style="color: #2b91af;"&gt;MaxInstances&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;:&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; key&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;nextSibling&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;firstChild&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;data &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; &lt;/SPAN&gt;&lt;SPAN class="lit" style="color: #7d2727;"&gt;5&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;
&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #101094;"&gt;if&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; key&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;firstChild&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;data &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;==&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; &lt;/SPAN&gt;&lt;SPAN class="str" style="color: #7d2727;"&gt;"{}"&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;format&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;recycleInterval&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;:&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; key&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;nextSibling&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;firstChild&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;data &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; &lt;/SPAN&gt;&lt;SPAN class="lit" style="color: #7d2727;"&gt;20&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;
&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #101094;"&gt;if&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; key&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;firstChild&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;data &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;==&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; &lt;/SPAN&gt;&lt;SPAN class="str" style="color: #7d2727;"&gt;"{}"&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;format&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;recycleStartTime&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;:&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; key&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;nextSibling&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;firstChild&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;data &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; &lt;/SPAN&gt;&lt;SPAN class="str" style="color: #7d2727;"&gt;'04:00'&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;
&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #101094;"&gt;if&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; key&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;firstChild&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;data &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;==&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; &lt;/SPAN&gt;&lt;SPAN class="str" style="color: #7d2727;"&gt;"{}"&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;format&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;keepAliveInterval&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;:&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; key&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;nextSibling&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;firstChild&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;data &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; &lt;/SPAN&gt;&lt;SPAN class="lit" style="color: #7d2727;"&gt;86400&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; &lt;/SPAN&gt;&lt;SPAN class="com" style="color: #858c93;"&gt;#seconds&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;


&lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #101094;"&gt;def&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; publishService&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;out_analysis&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; out_ssdraft&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; sd&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; con&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;):&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;
&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;...&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; 

&lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #101094;"&gt;def&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; main&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;():&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;
&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="com" style="color: #858c93;"&gt;# workspace&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;
&amp;nbsp; wrkspc &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; &lt;/SPAN&gt;&lt;SPAN class="str" style="color: #7d2727;"&gt;"path_to_workspace"&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;

&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="com" style="color: #858c93;"&gt;# server connection (publisher)&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;
&amp;nbsp; con &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; os&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;path&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;join&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;wrkspc&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; &lt;/SPAN&gt;&lt;SPAN class="str" style="color: #7d2727;"&gt;"file.ags"&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;
&amp;nbsp; service &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; &lt;/SPAN&gt;&lt;SPAN class="str" style="color: #7d2727;"&gt;"service_name"&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;

&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="com" style="color: #858c93;"&gt;# outputs mapservice&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;
&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;out_sddraft&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; out_analysis&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; mapService&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;wrkspc&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; con&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; service&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;

&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="com" style="color: #858c93;"&gt;# parse of XML (from sddraft analysis)&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;
&amp;nbsp; doc &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; dom&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;parse&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;out_sddraft&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;

&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="com" style="color: #858c93;"&gt;### ERROR HERE PARSING XML ###&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;
&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #101094;"&gt;with&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; open&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;out_sddraft&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; &lt;/SPAN&gt;&lt;SPAN class="str" style="color: #7d2727;"&gt;'w+'&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #101094;"&gt;as&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; xml&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;:&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;
&amp;nbsp; capability_toggle&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;doc&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; &lt;/SPAN&gt;&lt;SPAN class="str" style="color: #7d2727;"&gt;'WMSServer'&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; &lt;/SPAN&gt;&lt;SPAN class="str" style="color: #7d2727;"&gt;'on'&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;

&amp;nbsp; parameter_toggle&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;doc&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="str" style="color: #7d2727;"&gt;'maxRecordCount'&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; &lt;/SPAN&gt;&lt;SPAN class="str" style="color: #7d2727;"&gt;'MaxInstances'&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; &lt;/SPAN&gt;&lt;SPAN class="str" style="color: #7d2727;"&gt;'recycleInterval'&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; &lt;/SPAN&gt;&lt;SPAN class="str" style="color: #7d2727;"&gt;'recycleStartTime'&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; &lt;/SPAN&gt;&lt;SPAN class="str" style="color: #7d2727;"&gt;'keepAliveInterval'&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;
&amp;nbsp; doc&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;writexml&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;xml&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;

&amp;nbsp; sd &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; os&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;path&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;join&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;wrkspc&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;service &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;+&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; &lt;/SPAN&gt;&lt;SPAN class="str" style="color: #7d2727;"&gt;'.sd'&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;

&amp;nbsp; publishService&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;out_analysis&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; out_sddraft&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; sd&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; con&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;

&lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #101094;"&gt;if&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; __name__ &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;==&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; &lt;/SPAN&gt;&lt;SPAN class="str" style="color: #7d2727;"&gt;'__main__'&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;:&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;
&amp;nbsp; main&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;()&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="207149" alt="error_message_mapServiceCgp.png" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/207149_error_message_mapServiceCgp.png" style="width: 620px; height: 52px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 09:22:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/map-service-properties-arcpy-error-parsing/m-p/184560#M7352</guid>
      <dc:creator>EduardoAbreu-Freire</dc:creator>
      <dc:date>2021-12-11T09:22:34Z</dc:date>
    </item>
    <item>
      <title>Re: Map Service properties (arcpy): Error parsing recycleInterval, recycleStartTime, keepAliveInterval</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/map-service-properties-arcpy-error-parsing/m-p/184561#M7353</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't have time to dig into the why, but the error message is telling you that &lt;SPAN style="font-family: courier new,courier;"&gt;key.nextSibling.firstChild&lt;/SPAN&gt; is &lt;SPAN style="font-family: courier new,courier;"&gt;None&lt;/SPAN&gt;.&amp;nbsp; Trying to access the 'data' attribute of the first child fails because the NoneType object doesn't have an attribute with that name.&amp;nbsp; Before calling &lt;SPAN style="font-family: courier new,courier;"&gt;key.nextSibling.firstChild.data, &lt;SPAN style="font-family: Helvetica;"&gt;maybe do a check to see if there is a first child of the next sibling.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jun 2016 14:08:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/map-service-properties-arcpy-error-parsing/m-p/184561#M7353</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2016-06-08T14:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: Map Service properties (arcpy): Error parsing recycleInterval, recycleStartTime, keepAliveInterval</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/map-service-properties-arcpy-error-parsing/m-p/184562#M7354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you'd rather work with JSON than XML, you could publish the service as is, and then use the Admin API to update the service properties.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jun 2016 15:52:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/map-service-properties-arcpy-error-parsing/m-p/184562#M7354</guid>
      <dc:creator>JonathanQuinn</dc:creator>
      <dc:date>2016-06-08T15:52:40Z</dc:date>
    </item>
    <item>
      <title>Re: Map Service properties (arcpy): Error parsing recycleInterval, recycleStartTime, keepAliveInterval</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/map-service-properties-arcpy-error-parsing/m-p/184563#M7355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/16548"&gt;Jonathan Quinn&lt;/A&gt;​&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/3420"&gt;Joshua Bixby&lt;/A&gt;​&lt;/P&gt;&lt;P&gt;How can we access to all the data (map service properties) in xml format/structure?&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 14:13:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/map-service-properties-arcpy-error-parsing/m-p/184563#M7355</guid>
      <dc:creator>EduardoAbreu-Freire</dc:creator>
      <dc:date>2016-06-16T14:13:10Z</dc:date>
    </item>
    <item>
      <title>Re: Map Service properties (arcpy): Error parsing recycleInterval, recycleStartTime, keepAliveInterval</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/map-service-properties-arcpy-error-parsing/m-p/184564#M7356</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are running into issues while parsing &lt;SPAN style="font-family: courier new,courier;"&gt;out_sddraft&lt;/SPAN&gt;, so the issue can either be with the contents of &lt;SPAN style="font-family: courier new,courier;"&gt;out_sddraft&lt;/SPAN&gt; or your code to parse it.&amp;nbsp; Since your code for the &lt;SPAN style="font-family: courier new,courier;"&gt;mapService()&lt;/SPAN&gt; function is incomplete, and you haven't attached an XML file representing &lt;SPAN style="font-family: courier new,courier;"&gt;out_sddraft,&lt;/SPAN&gt; it is hard for people to provide feedback on &lt;SPAN style="font-family: courier new,courier;"&gt;out_sddraft&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the content of &lt;SPAN style="font-family: courier new,courier;"&gt;out_sddraft&lt;/SPAN&gt; is what it is supposed to be, then the issue becomes how you are parsing the content.&amp;nbsp; I hesitate to dive into the code for the &lt;SPAN style="font-family: courier new,courier;"&gt;parameter_toggle()&lt;/SPAN&gt; function because the code you posted cannot be the code you are using because the code you posted will generate a SyntaxError since you have strings as parameter names.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you expand and update your code, or attach an XML file, I can take another look.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 15:34:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/map-service-properties-arcpy-error-parsing/m-p/184564#M7356</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2016-06-16T15:34:31Z</dc:date>
    </item>
    <item>
      <title>Re: Map Service properties (arcpy): Error parsing recycleInterval, recycleStartTime, keepAliveInterval</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/map-service-properties-arcpy-error-parsing/m-p/184565#M7357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We also had problems using ESRI's example code from &lt;A href="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-mapping/createmapsddraft.htm" title="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-mapping/createmapsddraft.htm"&gt;CreateMapSDDraft—Help | ArcGIS for Desktop&amp;nbsp; &lt;/A&gt;to update draft service definitions. We used an XML beautifier to inspect the ssd_draft to make sure that all nodes that are referenced actually exist. I can't remember exactly but one or two minor changes were required to make it work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jun 2016 05:43:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/map-service-properties-arcpy-error-parsing/m-p/184565#M7357</guid>
      <dc:creator>JonLynch2</dc:creator>
      <dc:date>2016-06-17T05:43:51Z</dc:date>
    </item>
    <item>
      <title>Re: Map Service properties (arcpy): Error parsing recycleInterval, recycleStartTime, keepAliveInterval</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/map-service-properties-arcpy-error-parsing/m-p/184566#M7358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Exactly &lt;A href="https://community.esri.com/migrated-users/135622"&gt;Jon Lynch&lt;/A&gt; our current challenge is how to list all nodes and their childs. Ww appreciate if you can give more details on how you solved that&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jun 2016 09:04:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/map-service-properties-arcpy-error-parsing/m-p/184566#M7358</guid>
      <dc:creator>EduardoAbreu-Freire</dc:creator>
      <dc:date>2016-06-17T09:04:24Z</dc:date>
    </item>
    <item>
      <title>Re: Map Service properties (arcpy): Error parsing recycleInterval, recycleStartTime, keepAliveInterval</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/map-service-properties-arcpy-error-parsing/m-p/184567#M7359</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Eduardo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As &lt;A href="https://community.esri.com/migrated-users/135622"&gt;Jon Lynch&lt;/A&gt; says, Use a common text editor like Notepad++ and then add an XML plugin like XML tools and prettify the XML and you will see the keys and values. Tried to paste the xml examples, the editor messes it up.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As &lt;A href="https://community.esri.com/migrated-users/16548"&gt;Jonathan Quinn&lt;/A&gt; says, I am tending towards editing the json than XML, it seems less clutter to deal with. But I can see why you want to do this - have a map service published as you want right from the start.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jul 2016 22:35:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/map-service-properties-arcpy-error-parsing/m-p/184567#M7359</guid>
      <dc:creator>SubuSwaminathan1</dc:creator>
      <dc:date>2016-07-13T22:35:40Z</dc:date>
    </item>
    <item>
      <title>Re: Map Service properties (arcpy): Error parsing recycleInterval, recycleStartTime, keepAliveInterval</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/map-service-properties-arcpy-error-parsing/m-p/184568#M7360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;After searching a long time the answer found:&lt;/P&gt;&lt;P&gt;change your line:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;if&lt;/SPAN&gt;&amp;nbsp;key.firstChild.data&amp;nbsp;==&amp;nbsp;&lt;SPAN class=""&gt;"{}"&lt;/SPAN&gt;.format(recycleStartTime)&amp;nbsp;:&amp;nbsp;key.nextSibling.firstChild.data&amp;nbsp;=&amp;nbsp;&lt;SPAN class=""&gt;'04:00'&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;to:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if key.firstChild.data == &lt;SPAN class=""&gt;"{}"&lt;/SPAN&gt;.format(recycleStartTime)&amp;nbsp;: &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp; key.nextSibling.firstChild == None:&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; x = doc.createTextNode("04:00") &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; key.nextSibling.appendChild(x)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Jul 2017 14:21:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/map-service-properties-arcpy-error-parsing/m-p/184568#M7360</guid>
      <dc:creator>Huub_vanAmelsvoort</dc:creator>
      <dc:date>2017-07-14T14:21:24Z</dc:date>
    </item>
  </channel>
</rss>

