<?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 Submit and Extract xml data in Splunk Enterprise Security</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Submit-and-Extract-xml-data/m-p/436315#M5776</link>
    <description>&lt;P&gt;Hi, I submitted a xml string to specific index using (.submit()) in python.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index = splunk_client.indexes[index_name]
 index.submit(attack, source=source, sourcetype=uuid, **params)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then,I tried to extract the data  using &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;kwargs_oneshot = {"count": 0}
query = r"search index="stream_buffer""
    try:

        oneshotsearch_results = splunk_client.jobs.oneshot(query, **kwargs_oneshot)
        query_results = results.ResultsReader(oneshotsearch_results)
        results_list = [result for result in query_results]
    except (ValueError, HTTPError):
        pass
    return results_list
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;A 166 elements list returned -with the uploaded data- but not in the correct order - so I can't use the returned data.&lt;BR /&gt;
 How can I get the result in the correct order?&lt;/P&gt;</description>
    <pubDate>Tue, 05 Jun 2018 11:02:00 GMT</pubDate>
    <dc:creator>avivz</dc:creator>
    <dc:date>2018-06-05T11:02:00Z</dc:date>
    <item>
      <title>Submit and Extract xml data</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Submit-and-Extract-xml-data/m-p/436315#M5776</link>
      <description>&lt;P&gt;Hi, I submitted a xml string to specific index using (.submit()) in python.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index = splunk_client.indexes[index_name]
 index.submit(attack, source=source, sourcetype=uuid, **params)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then,I tried to extract the data  using &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;kwargs_oneshot = {"count": 0}
query = r"search index="stream_buffer""
    try:

        oneshotsearch_results = splunk_client.jobs.oneshot(query, **kwargs_oneshot)
        query_results = results.ResultsReader(oneshotsearch_results)
        results_list = [result for result in query_results]
    except (ValueError, HTTPError):
        pass
    return results_list
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;A 166 elements list returned -with the uploaded data- but not in the correct order - so I can't use the returned data.&lt;BR /&gt;
 How can I get the result in the correct order?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 11:02:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Submit-and-Extract-xml-data/m-p/436315#M5776</guid>
      <dc:creator>avivz</dc:creator>
      <dc:date>2018-06-05T11:02:00Z</dc:date>
    </item>
  </channel>
</rss>

