<?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 Multi XML Field Extraction in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Multi-XML-Field-Extraction/m-p/86351#M22018</link>
    <description>&lt;P&gt;Given an entry like below, my goal is to pull all the "fieldName" parameters, essentially recreating the "where" clause being submitted to the database.  I would want the output to be along the lines of&lt;/P&gt;

&lt;P&gt;_time RID fieldName#1 fieldName#2 fieldName...., Or&lt;/P&gt;

&lt;P&gt;2013-01-14 07:32:13.182 | 1358177533172-2801682 | Process Date | Applied Amount&lt;/P&gt;

&lt;P&gt;2013-01-14 07:32:13,182 INFO  [ndler-RMICallHandler-4364] RID=1358177533172-2801682 c.r.t.services.AbstractServiceWsImpl - &lt;WEB service="" request=""&gt; {USER ID} -&lt;REDACTED&gt;- {SERVICE METHOD} SearchRequest  {REQUESTED} &amp;lt;?xml version = '1.0' encoding = 'UTF-8'?&amp;gt; &lt;SEARCHREQUEST xmlns=""&gt;&lt;CALLINGUSERID&gt;-&lt;REDACTED&gt;-&lt;/REDACTED&gt;&lt;APPLICATIONID type="xsd:long"&gt;-&lt;REDACTED&gt;-&lt;/REDACTED&gt;&lt;SEARCHPARAMS&gt;&lt;SEARCHPARAM&gt;&lt;FIELDNAME&gt;Process Date&lt;/FIELDNAME&gt;&lt;VALUELOW&gt;2013-01-11&lt;/VALUELOW&gt;&lt;VALUEHIGH&gt;2013-01-11&lt;/VALUEHIGH&gt;&lt;/SEARCHPARAM&gt;&lt;SEARCHPARAM&gt;&lt;FIELDNAME&gt;Applied Amount&lt;/FIELDNAME&gt;&lt;VALUELOW&gt;4742.81&lt;/VALUELOW&gt;&lt;VALUEHIGH&gt;4742.81&lt;/VALUEHIGH&gt;&lt;/SEARCHPARAM&gt;&lt;/SEARCHPARAMS&gt;&lt;/APPLICATIONID&gt;&lt;/CALLINGUSERID&gt;&lt;/SEARCHREQUEST&gt;&lt;/REDACTED&gt;&lt;/WEB&gt;&lt;/P&gt;

&lt;P&gt;Any suggestions ?&lt;/P&gt;</description>
    <pubDate>Mon, 14 Jan 2013 15:48:12 GMT</pubDate>
    <dc:creator>tyronetv</dc:creator>
    <dc:date>2013-01-14T15:48:12Z</dc:date>
    <item>
      <title>Multi XML Field Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Multi-XML-Field-Extraction/m-p/86351#M22018</link>
      <description>&lt;P&gt;Given an entry like below, my goal is to pull all the "fieldName" parameters, essentially recreating the "where" clause being submitted to the database.  I would want the output to be along the lines of&lt;/P&gt;

&lt;P&gt;_time RID fieldName#1 fieldName#2 fieldName...., Or&lt;/P&gt;

&lt;P&gt;2013-01-14 07:32:13.182 | 1358177533172-2801682 | Process Date | Applied Amount&lt;/P&gt;

&lt;P&gt;2013-01-14 07:32:13,182 INFO  [ndler-RMICallHandler-4364] RID=1358177533172-2801682 c.r.t.services.AbstractServiceWsImpl - &lt;WEB service="" request=""&gt; {USER ID} -&lt;REDACTED&gt;- {SERVICE METHOD} SearchRequest  {REQUESTED} &amp;lt;?xml version = '1.0' encoding = 'UTF-8'?&amp;gt; &lt;SEARCHREQUEST xmlns=""&gt;&lt;CALLINGUSERID&gt;-&lt;REDACTED&gt;-&lt;/REDACTED&gt;&lt;APPLICATIONID type="xsd:long"&gt;-&lt;REDACTED&gt;-&lt;/REDACTED&gt;&lt;SEARCHPARAMS&gt;&lt;SEARCHPARAM&gt;&lt;FIELDNAME&gt;Process Date&lt;/FIELDNAME&gt;&lt;VALUELOW&gt;2013-01-11&lt;/VALUELOW&gt;&lt;VALUEHIGH&gt;2013-01-11&lt;/VALUEHIGH&gt;&lt;/SEARCHPARAM&gt;&lt;SEARCHPARAM&gt;&lt;FIELDNAME&gt;Applied Amount&lt;/FIELDNAME&gt;&lt;VALUELOW&gt;4742.81&lt;/VALUELOW&gt;&lt;VALUEHIGH&gt;4742.81&lt;/VALUEHIGH&gt;&lt;/SEARCHPARAM&gt;&lt;/SEARCHPARAMS&gt;&lt;/APPLICATIONID&gt;&lt;/CALLINGUSERID&gt;&lt;/SEARCHREQUEST&gt;&lt;/REDACTED&gt;&lt;/WEB&gt;&lt;/P&gt;

&lt;P&gt;Any suggestions ?&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jan 2013 15:48:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Multi-XML-Field-Extraction/m-p/86351#M22018</guid>
      <dc:creator>tyronetv</dc:creator>
      <dc:date>2013-01-14T15:48:12Z</dc:date>
    </item>
    <item>
      <title>Re: Multi XML Field Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Multi-XML-Field-Extraction/m-p/86352#M22019</link>
      <description>&lt;P&gt;spath will munch your XML into splunk fields.&lt;/P&gt;

&lt;P&gt;i.e.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | spath path=searchrequest.callinguserid.applicationid.searchparams.searchparam.fieldname output=fieldnames 
| eval fieldnames=mvjoin(fieldnames,",")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So we're saying, in the xml, get all the instances of searchrequest.callinguserid.applicationid.searchparams.searchparam.fieldname, and put it in a field called fieldnames.    &lt;/P&gt;

&lt;P&gt;This is a multivalue field, so we join the values with a ','&lt;/P&gt;</description>
      <pubDate>Sun, 20 Jan 2013 12:39:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Multi-XML-Field-Extraction/m-p/86352#M22019</guid>
      <dc:creator>jonuwz</dc:creator>
      <dc:date>2013-01-20T12:39:10Z</dc:date>
    </item>
    <item>
      <title>Re: Multi XML Field Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Multi-XML-Field-Extraction/m-p/86353#M22020</link>
      <description>&lt;P&gt;I used the following:&lt;BR /&gt;&lt;BR /&gt;
... | spath path=searchRequest.callingUserId.applicationId.searchParams.searchParam.fieldName output=fieldnames |eval fieldnames=mvjoin(fieldnames,",")&lt;/P&gt;

&lt;P&gt;As I read the documentation on spath the letter case is important (or not, but I tried) but even this did not pull the fields as I would of hoped.  As a matter of fact no fields were identified.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jan 2013 14:37:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Multi-XML-Field-Extraction/m-p/86353#M22020</guid>
      <dc:creator>tyronetv</dc:creator>
      <dc:date>2013-01-22T14:37:30Z</dc:date>
    </item>
    <item>
      <title>Re: Multi XML Field Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Multi-XML-Field-Extraction/m-p/86354#M22021</link>
      <description>&lt;P&gt;what happens if you just run it through &lt;CODE&gt;| spath&lt;/CODE&gt; ?&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jan 2013 13:41:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Multi-XML-Field-Extraction/m-p/86354#M22021</guid>
      <dc:creator>jonuwz</dc:creator>
      <dc:date>2013-01-23T13:41:39Z</dc:date>
    </item>
  </channel>
</rss>

