<?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 How to extract multi value field from XML? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-extract-multi-value-field-from-XML/m-p/231858#M14377</link>
    <description>&lt;P&gt;I want to build a multi value field from my XML. Checking out both the documentation and the answers I figure out I should use &lt;CODE&gt;spath&lt;/CODE&gt; instead of &lt;CODE&gt;xmlkv&lt;/CODE&gt;. However, the provided examples did not work for my case. So let me share what I did in order to allow you to point where is my mistake or a better new option, please.&lt;/P&gt;

&lt;P&gt;Here is an example of my XML:&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/1968i2F88EEAD028B7FD5/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;And here is the search I tried:&lt;BR /&gt;
&lt;CODE&gt;... | spath output=parameterNumber path=Request.RequestParameter.parameterNumber | spath output=parameterValue path=Request.RequestParameter.parameterValue&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Thanks in advance!&lt;/P&gt;

&lt;P&gt;Regards,&lt;/P&gt;

&lt;P&gt;Tiago&lt;/P&gt;</description>
    <pubDate>Wed, 05 Oct 2016 16:23:35 GMT</pubDate>
    <dc:creator>tcmarquesi</dc:creator>
    <dc:date>2016-10-05T16:23:35Z</dc:date>
    <item>
      <title>How to extract multi value field from XML?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-extract-multi-value-field-from-XML/m-p/231858#M14377</link>
      <description>&lt;P&gt;I want to build a multi value field from my XML. Checking out both the documentation and the answers I figure out I should use &lt;CODE&gt;spath&lt;/CODE&gt; instead of &lt;CODE&gt;xmlkv&lt;/CODE&gt;. However, the provided examples did not work for my case. So let me share what I did in order to allow you to point where is my mistake or a better new option, please.&lt;/P&gt;

&lt;P&gt;Here is an example of my XML:&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/1968i2F88EEAD028B7FD5/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;And here is the search I tried:&lt;BR /&gt;
&lt;CODE&gt;... | spath output=parameterNumber path=Request.RequestParameter.parameterNumber | spath output=parameterValue path=Request.RequestParameter.parameterValue&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Thanks in advance!&lt;/P&gt;

&lt;P&gt;Regards,&lt;/P&gt;

&lt;P&gt;Tiago&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2016 16:23:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-extract-multi-value-field-from-XML/m-p/231858#M14377</guid>
      <dc:creator>tcmarquesi</dc:creator>
      <dc:date>2016-10-05T16:23:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract multi value field from XML?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-extract-multi-value-field-from-XML/m-p/231859#M14378</link>
      <description>&lt;P&gt;I also tryed the following and did not work...&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;... | xmlkv | table ID, TS, Name, Request.RequestParameter.parameterNumber, Request.RequestParameter.parameterValue&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2016 16:41:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-extract-multi-value-field-from-XML/m-p/231859#M14378</guid>
      <dc:creator>tcmarquesi</dc:creator>
      <dc:date>2016-10-05T16:41:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract multi value field from XML?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-extract-multi-value-field-from-XML/m-p/231860#M14379</link>
      <description>&lt;P&gt;Just complementing, I think I can't set &lt;CODE&gt;KV_MODE = xml&lt;/CODE&gt; in my &lt;EM&gt;props.conf&lt;/EM&gt; as sugested in * &lt;A href="https://answers.splunk.com/answers/227887/how-to-extract-multivalue-fields-from-xml-data-at.html"&gt;https://answers.splunk.com/answers/227887/how-to-extract-multivalue-fields-from-xml-data-at.html&lt;/A&gt; * because the events are not XML-formated, but the XML is into one particular field in some events.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2016 17:29:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-extract-multi-value-field-from-XML/m-p/231860#M14379</guid>
      <dc:creator>tcmarquesi</dc:creator>
      <dc:date>2016-10-05T17:29:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract multi value field from XML?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-extract-multi-value-field-from-XML/m-p/231861#M14380</link>
      <description>&lt;P&gt;Have you tried regex? Like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | rex max_match=0 field=fieldwithxmldata "Number\&amp;gt;(?&amp;lt;nbr&amp;gt;\d+).*[\n\r]*.*.*\&amp;gt;(?&amp;lt;val&amp;gt;\w+)" | eval z=mvzip(nbr, val) | mvexpand z | rex field=z "(?&amp;lt;nbr&amp;gt;[^,]+),(?&amp;lt;val&amp;gt;.*)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 05 Oct 2016 17:59:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-extract-multi-value-field-from-XML/m-p/231861#M14380</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-10-05T17:59:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract multi value field from XML?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-extract-multi-value-field-from-XML/m-p/231862#M14381</link>
      <description>&lt;P&gt;Worked, thank you! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2016 20:12:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-extract-multi-value-field-from-XML/m-p/231862#M14381</guid>
      <dc:creator>tcmarquesi</dc:creator>
      <dc:date>2016-10-05T20:12:05Z</dc:date>
    </item>
  </channel>
</rss>

