<?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 Receive Xml over REST in ArcGIS GeoEvent Server Questions</title>
    <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/receive-xml-over-rest/m-p/28700#M104</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi I would like to receive following Xml over REST in GeoEvent&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;
&amp;lt;ez_data&amp;gt;
&amp;lt;fz title="First Test" id="abc55"&amp;gt;
&amp;lt;updated timestamp="2016-02-12T22:59:59Z"/&amp;gt;
&amp;lt;pos x="52.30" y="-13.02"/&amp;gt;
&amp;lt;Statuslist&amp;gt;
&amp;lt;Assetstatus Status="NORMAL" type="A"/&amp;gt;
&amp;lt;Assetstatus Status="NORMAL" type="C"/&amp;gt;
&amp;lt;Assetstatus Status="NORMAL" type="C"/&amp;gt;
&amp;lt;Assetstatus Status="ABNORMAL" type="B"/&amp;gt;
&amp;lt;Assetstatus Status="ABNORMAL" type="C"/&amp;gt;
&amp;lt;/Statuslist&amp;gt;
&amp;lt;/fz&amp;gt;
&amp;lt;/ez_data&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to generate a new field using a defined logic by looking at the values of status and type in the list&lt;/P&gt;&lt;P&gt;e.g. if status="ABNORMAL" and type = "B", then new field= "MAJOR"&lt;/P&gt;&lt;P&gt;Is this feasible using any processor in GeoEvent ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Dec 2021 21:09:30 GMT</pubDate>
    <dc:creator>RaoBase</dc:creator>
    <dc:date>2021-12-10T21:09:30Z</dc:date>
    <item>
      <title>Receive Xml over REST</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/receive-xml-over-rest/m-p/28700#M104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi I would like to receive following Xml over REST in GeoEvent&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;
&amp;lt;ez_data&amp;gt;
&amp;lt;fz title="First Test" id="abc55"&amp;gt;
&amp;lt;updated timestamp="2016-02-12T22:59:59Z"/&amp;gt;
&amp;lt;pos x="52.30" y="-13.02"/&amp;gt;
&amp;lt;Statuslist&amp;gt;
&amp;lt;Assetstatus Status="NORMAL" type="A"/&amp;gt;
&amp;lt;Assetstatus Status="NORMAL" type="C"/&amp;gt;
&amp;lt;Assetstatus Status="NORMAL" type="C"/&amp;gt;
&amp;lt;Assetstatus Status="ABNORMAL" type="B"/&amp;gt;
&amp;lt;Assetstatus Status="ABNORMAL" type="C"/&amp;gt;
&amp;lt;/Statuslist&amp;gt;
&amp;lt;/fz&amp;gt;
&amp;lt;/ez_data&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to generate a new field using a defined logic by looking at the values of status and type in the list&lt;/P&gt;&lt;P&gt;e.g. if status="ABNORMAL" and type = "B", then new field= "MAJOR"&lt;/P&gt;&lt;P&gt;Is this feasible using any processor in GeoEvent ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:09:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/receive-xml-over-rest/m-p/28700#M104</guid>
      <dc:creator>RaoBase</dc:creator>
      <dc:date>2021-12-10T21:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: Receive Xml over REST</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/receive-xml-over-rest/m-p/28701#M105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: 12.0pt;"&gt;Hello Rao –&lt;/P&gt;&lt;P style="margin-bottom: 12.0pt;"&gt;Yes, the XML sample you provided above can easily be adapted by the product’s XML adapter and processed by a GeoEvent Service.&lt;/P&gt;&lt;P style="margin-bottom: 12.0pt;"&gt;The first remark I have is that XML is translated to JSON by the product’s adapter.&amp;nbsp; So you will want to avoid using XML attributes which can contend with sub-elements of a given node. Your data sample is pretty clean, but to illustrate, this is what it looks like as JSON:&lt;/P&gt;&lt;P style="margin-bottom: 12.0pt;"&gt;&lt;IMG __jive_id="195934" alt="Capture.png" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/195934_Capture.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P style="margin-bottom: 12.0pt;"&gt;Your challenge, using GeoEvent, will be that you want to access items in a list which is part of a larger structure. If you were to stipulate that the list &amp;lt;Assetstatus&amp;gt; would always have exactly 5 items, then we could assume that you could pull specific items out by index. For example:&lt;/P&gt;&lt;P style="margin-bottom: 12.0pt;"&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Courier New';"&gt;ez_data.fz.Statuslist.Assetstatus[3].Status&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 12.0pt;"&gt;This isn’t normally something that you can stipulate and we cannot therefore assume there will be a fixed number of items in the list. In that case you have one opportunity – as part of the GeoEvent input’s configuration – to tell the adapter that it should use something other than &amp;lt;ez_data&amp;gt; as the root node.&lt;/P&gt;&lt;P style="margin-bottom: 12.0pt;"&gt;You specify this using the &lt;SPAN style="font-size: 9.0pt; font-family: 'Verdana',sans-serif; color: #505051; background: white;"&gt;XML Object Name&lt;/SPAN&gt; parameter:&lt;/P&gt;&lt;P style="margin-bottom: 12.0pt;"&gt;&lt;IMG __jive_id="195962" alt="Capture2.png" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/195962_Capture2.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P style="margin-bottom: 12.0pt;"&gt;This way, the five items in your sample XML’s &amp;lt;Assetstatus&amp;gt; list are each brought in as separate events. The upside is that you don’t need to worry about how many items will be in the list. The downside is you do not have the title, id, timestamp, or coordinate information that is above the &amp;lt;Assetstatus&amp;gt; node in the data structure.&lt;/P&gt;&lt;P style="margin-bottom: 12.0pt;"&gt;There is work you can do to pull information from a XML feed’s header and incorporate it into individual event records. Please refer to the thread &lt;SPAN style="font-size: 10.0pt; font-family: 'Verdana',sans-serif;"&gt;&lt;A href="http://geonet.esri.com/message/541195"&gt;XML can I use this source&lt;/A&gt;​&lt;/SPAN&gt; if you are interested in taking that approach.&lt;/P&gt;&lt;P style="margin-bottom: 12.0pt;"&gt;Hope this information is helpful -&lt;BR /&gt;RJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Apr 2016 00:00:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/receive-xml-over-rest/m-p/28701#M105</guid>
      <dc:creator>RJSunderman</dc:creator>
      <dc:date>2016-04-22T00:00:08Z</dc:date>
    </item>
  </channel>
</rss>

