<?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 Writing SOAP returned results to table in file geodatabase in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/writing-soap-returned-results-to-table-in-file/m-p/725732#M56229</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a script which prints the lat, lon of bus routes, how would I use arcpy to print this to a table in a file geodatabase? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Example of Output&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;45.266759 -75.741350&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;45.266221 -75.741675&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;45.311531 -75.739158&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;45.355146 -75.769231&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;45.412336 -75.718080&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&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;&lt;SPAN style="font-weight: bold;"&gt;import &lt;/SPAN&gt;xml.etree.ElementTree &lt;SPAN style="font-weight: bold;"&gt;as &lt;/SPAN&gt;ET
&lt;SPAN style="font-weight: bold;"&gt;import &lt;/SPAN&gt;urllib

u &lt;SPAN style="font-weight: bold;"&gt;= &lt;/SPAN&gt;urllib.urlopen(&lt;SPAN style="color: #dd1144;"&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://api.octranspo1.com/v1.1/GetNextTripsForStop" rel="nofollow noopener noreferrer" target="_blank"&gt;https://api.octranspo1.com/v1.1/GetNextTripsForStop&lt;/A&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;/SPAN&gt;, &lt;SPAN style="color: #dd1144;"&gt;'appID=7a51d100&amp;amp;apiKey=5c5a8438efc643286006d82071852789&amp;amp;routeNo=95&amp;amp;stopNo=3044'&lt;/SPAN&gt;)
data &lt;SPAN style="font-weight: bold;"&gt;= &lt;/SPAN&gt;u.read()

f &lt;SPAN style="font-weight: bold;"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #0086b3;"&gt;open&lt;/SPAN&gt;(&lt;SPAN style="color: #dd1144;"&gt;'route3044.xml'&lt;/SPAN&gt;, &lt;SPAN style="color: #dd1144;"&gt;'wb'&lt;/SPAN&gt;)
f.write(data)
f.close()

doc &lt;SPAN style="font-weight: bold;"&gt;= &lt;/SPAN&gt;ET.parse(&lt;SPAN style="color: #dd1144;"&gt;'route3044.xml'&lt;/SPAN&gt;)

&lt;SPAN style="font-weight: bold;"&gt;for &lt;/SPAN&gt;bus &lt;SPAN style="font-weight: bold;"&gt;in &lt;/SPAN&gt;doc.findall(&lt;SPAN style="color: #dd1144;"&gt;&lt;SPAN&gt;'.//{&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://tempuri.org/" rel="nofollow noopener noreferrer" target="_blank"&gt;http://tempuri.org/&lt;/A&gt;&lt;SPAN&gt;}Trip'&lt;/SPAN&gt;&lt;/SPAN&gt;)&lt;SPAN style="font-weight: bold;"&gt;:
&lt;/SPAN&gt;&lt;SPAN style="font-weight: bold;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;lat &lt;SPAN style="font-weight: bold;"&gt;= &lt;/SPAN&gt;bus.findtext(&lt;SPAN style="color: #dd1144;"&gt;&lt;SPAN&gt;'{&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://tempuri.org/" rel="nofollow noopener noreferrer" target="_blank"&gt;http://tempuri.org/&lt;/A&gt;&lt;SPAN&gt;}Latitude'&lt;/SPAN&gt;&lt;/SPAN&gt;)
&amp;nbsp; lon &lt;SPAN style="font-weight: bold;"&gt;= &lt;/SPAN&gt;bus.findtext(&lt;SPAN style="color: #dd1144;"&gt;&lt;SPAN&gt;'{&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://tempuri.org/" rel="nofollow noopener noreferrer" target="_blank"&gt;http://tempuri.org/&lt;/A&gt;&lt;SPAN&gt;}Longitude'&lt;/SPAN&gt;&lt;/SPAN&gt;)
&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-weight: bold;"&gt;print &lt;/SPAN&gt;lat, lon&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 07:01:53 GMT</pubDate>
    <dc:creator>GeoffreyWest</dc:creator>
    <dc:date>2021-12-12T07:01:53Z</dc:date>
    <item>
      <title>Writing SOAP returned results to table in file geodatabase</title>
      <link>https://community.esri.com/t5/python-questions/writing-soap-returned-results-to-table-in-file/m-p/725732#M56229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a script which prints the lat, lon of bus routes, how would I use arcpy to print this to a table in a file geodatabase? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Example of Output&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;45.266759 -75.741350&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;45.266221 -75.741675&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;45.311531 -75.739158&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;45.355146 -75.769231&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;45.412336 -75.718080&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&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;&lt;SPAN style="font-weight: bold;"&gt;import &lt;/SPAN&gt;xml.etree.ElementTree &lt;SPAN style="font-weight: bold;"&gt;as &lt;/SPAN&gt;ET
&lt;SPAN style="font-weight: bold;"&gt;import &lt;/SPAN&gt;urllib

u &lt;SPAN style="font-weight: bold;"&gt;= &lt;/SPAN&gt;urllib.urlopen(&lt;SPAN style="color: #dd1144;"&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://api.octranspo1.com/v1.1/GetNextTripsForStop" rel="nofollow noopener noreferrer" target="_blank"&gt;https://api.octranspo1.com/v1.1/GetNextTripsForStop&lt;/A&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;/SPAN&gt;, &lt;SPAN style="color: #dd1144;"&gt;'appID=7a51d100&amp;amp;apiKey=5c5a8438efc643286006d82071852789&amp;amp;routeNo=95&amp;amp;stopNo=3044'&lt;/SPAN&gt;)
data &lt;SPAN style="font-weight: bold;"&gt;= &lt;/SPAN&gt;u.read()

f &lt;SPAN style="font-weight: bold;"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #0086b3;"&gt;open&lt;/SPAN&gt;(&lt;SPAN style="color: #dd1144;"&gt;'route3044.xml'&lt;/SPAN&gt;, &lt;SPAN style="color: #dd1144;"&gt;'wb'&lt;/SPAN&gt;)
f.write(data)
f.close()

doc &lt;SPAN style="font-weight: bold;"&gt;= &lt;/SPAN&gt;ET.parse(&lt;SPAN style="color: #dd1144;"&gt;'route3044.xml'&lt;/SPAN&gt;)

&lt;SPAN style="font-weight: bold;"&gt;for &lt;/SPAN&gt;bus &lt;SPAN style="font-weight: bold;"&gt;in &lt;/SPAN&gt;doc.findall(&lt;SPAN style="color: #dd1144;"&gt;&lt;SPAN&gt;'.//{&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://tempuri.org/" rel="nofollow noopener noreferrer" target="_blank"&gt;http://tempuri.org/&lt;/A&gt;&lt;SPAN&gt;}Trip'&lt;/SPAN&gt;&lt;/SPAN&gt;)&lt;SPAN style="font-weight: bold;"&gt;:
&lt;/SPAN&gt;&lt;SPAN style="font-weight: bold;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;lat &lt;SPAN style="font-weight: bold;"&gt;= &lt;/SPAN&gt;bus.findtext(&lt;SPAN style="color: #dd1144;"&gt;&lt;SPAN&gt;'{&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://tempuri.org/" rel="nofollow noopener noreferrer" target="_blank"&gt;http://tempuri.org/&lt;/A&gt;&lt;SPAN&gt;}Latitude'&lt;/SPAN&gt;&lt;/SPAN&gt;)
&amp;nbsp; lon &lt;SPAN style="font-weight: bold;"&gt;= &lt;/SPAN&gt;bus.findtext(&lt;SPAN style="color: #dd1144;"&gt;&lt;SPAN&gt;'{&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://tempuri.org/" rel="nofollow noopener noreferrer" target="_blank"&gt;http://tempuri.org/&lt;/A&gt;&lt;SPAN&gt;}Longitude'&lt;/SPAN&gt;&lt;/SPAN&gt;)
&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-weight: bold;"&gt;print &lt;/SPAN&gt;lat, lon&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 07:01:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/writing-soap-returned-results-to-table-in-file/m-p/725732#M56229</guid>
      <dc:creator>GeoffreyWest</dc:creator>
      <dc:date>2021-12-12T07:01:53Z</dc:date>
    </item>
  </channel>
</rss>

