<?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 Re: Difference between using xmlkv and KV_MODE=xml in Knowledge Management</title>
    <link>https://community.splunk.com/t5/Knowledge-Management/Difference-between-using-xmlkv-and-KV-MODE-xml/m-p/344205#M6709</link>
    <description>&lt;P&gt;As per splunk documentation here is the difference &lt;/P&gt;

&lt;P&gt;The xmlkv command automatically extracts fields from XML-formatted data. For example, if the XML contains the following in its _raw data . xmlkv command needed to be invoked by the user to get the fields.&lt;/P&gt;

&lt;P&gt;KV_MODE = xml is a search time field extraction that happens before the results are fetched to the user .This setting automatically bring the field extractions automatically.&lt;/P&gt;

&lt;P&gt;Hence KV_MODE =xml is the best practice and performance wise there wont be  much difference (not sure)&lt;/P&gt;</description>
    <pubDate>Thu, 03 May 2018 03:46:32 GMT</pubDate>
    <dc:creator>ssadanala1</dc:creator>
    <dc:date>2018-05-03T03:46:32Z</dc:date>
    <item>
      <title>Difference between using xmlkv and KV_MODE=xml</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Difference-between-using-xmlkv-and-KV-MODE-xml/m-p/344204#M6708</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
I am getting inputs in the form of xml files.. To extract the fields from xml, do i need to use xmlkv in search or KV_MODE=xml in props.conf?&lt;BR /&gt;
Which one gives better performance and what is the difference between the two?&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2017 11:35:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Difference-between-using-xmlkv-and-KV-MODE-xml/m-p/344204#M6708</guid>
      <dc:creator>pasokkum</dc:creator>
      <dc:date>2017-04-24T11:35:39Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between using xmlkv and KV_MODE=xml</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Difference-between-using-xmlkv-and-KV-MODE-xml/m-p/344205#M6709</link>
      <description>&lt;P&gt;As per splunk documentation here is the difference &lt;/P&gt;

&lt;P&gt;The xmlkv command automatically extracts fields from XML-formatted data. For example, if the XML contains the following in its _raw data . xmlkv command needed to be invoked by the user to get the fields.&lt;/P&gt;

&lt;P&gt;KV_MODE = xml is a search time field extraction that happens before the results are fetched to the user .This setting automatically bring the field extractions automatically.&lt;/P&gt;

&lt;P&gt;Hence KV_MODE =xml is the best practice and performance wise there wont be  much difference (not sure)&lt;/P&gt;</description>
      <pubDate>Thu, 03 May 2018 03:46:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Difference-between-using-xmlkv-and-KV-MODE-xml/m-p/344205#M6709</guid>
      <dc:creator>ssadanala1</dc:creator>
      <dc:date>2018-05-03T03:46:32Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between using xmlkv and KV_MODE=xml</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Difference-between-using-xmlkv-and-KV-MODE-xml/m-p/559646#M6710</link>
      <description>&lt;P&gt;The underlying code for both is the same so the performance won't be much different.&amp;nbsp;&amp;nbsp;The difference is when do you want these fields extracted and when don't you.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;KV_MODE=xml&lt;/FONT&gt; will be always done for that sourcetype.&amp;nbsp;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;xmlkv&lt;/FONT&gt; will only be done when you use it in a search string.&amp;nbsp;&lt;BR /&gt;So if you always want all of the fields to be extracted use &lt;FONT face="courier new,courier"&gt;KV_MODE&lt;/FONT&gt; but if you only want the fields to be occasionally extracted use &lt;FONT face="courier new,courier"&gt;xmlkv&lt;/FONT&gt; in your search string.&lt;BR /&gt;If you only want one or two fields from a big xml file, it might be better to extract them using normal regex extraction&lt;BR /&gt;&lt;BR /&gt;Another use for &lt;FONT face="courier new,courier"&gt;xmlkv&lt;/FONT&gt; is when not all of your event is clean xml. KV_MODE would fail and not give you the fields. In a search, you can use an eval or rex to extract and clean the xml portion and then run &lt;FONT face="courier new,courier"&gt;xmlkv&lt;/FONT&gt; on that.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jul 2021 16:37:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Difference-between-using-xmlkv-and-KV-MODE-xml/m-p/559646#M6710</guid>
      <dc:creator>bmunson_splunk</dc:creator>
      <dc:date>2021-07-15T16:37:48Z</dc:date>
    </item>
  </channel>
</rss>

