<?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 we can assign a default value for empty tag with KV_MODE=xml? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/how-we-can-assign-a-default-value-for-empty-tag-with-KV-MODE-xml/m-p/525453#M88718</link>
    <description>&lt;P&gt;Hi folks,&lt;/P&gt;&lt;P&gt;Any idea how we can assign a default value for empty tag with KV_MODE=xml?&lt;/P&gt;&lt;P&gt;The reason is, we have a xml segment repeated multiple times under same parent/grandparent, as such same tag names (xpath) repeated multiple times. So one field for each tag name is extracted with a mv value.&lt;BR /&gt;Now the issue is if some of the tag in the middle is empty, it will mess up the mv index in these fields.&lt;BR /&gt;And we need the full xpath as the field name, so it is hard to do a manual generic field extraction ($1::$2) either.&amp;nbsp;&lt;/P&gt;&lt;P&gt;A quick thought is if we can fill up a special value in the raw, then all mv fields will stay well aligned. But is this the only option?&lt;/P&gt;&lt;P&gt;Any suggestion or better solution?&lt;BR /&gt;Or can we do it at search time with sonething like " |&amp;nbsp;rex field=ccnumber mode=sed ..."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 19 Oct 2020 20:34:01 GMT</pubDate>
    <dc:creator>imgarytan</dc:creator>
    <dc:date>2020-10-19T20:34:01Z</dc:date>
    <item>
      <title>how we can assign a default value for empty tag with KV_MODE=xml?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-we-can-assign-a-default-value-for-empty-tag-with-KV-MODE-xml/m-p/525453#M88718</link>
      <description>&lt;P&gt;Hi folks,&lt;/P&gt;&lt;P&gt;Any idea how we can assign a default value for empty tag with KV_MODE=xml?&lt;/P&gt;&lt;P&gt;The reason is, we have a xml segment repeated multiple times under same parent/grandparent, as such same tag names (xpath) repeated multiple times. So one field for each tag name is extracted with a mv value.&lt;BR /&gt;Now the issue is if some of the tag in the middle is empty, it will mess up the mv index in these fields.&lt;BR /&gt;And we need the full xpath as the field name, so it is hard to do a manual generic field extraction ($1::$2) either.&amp;nbsp;&lt;/P&gt;&lt;P&gt;A quick thought is if we can fill up a special value in the raw, then all mv fields will stay well aligned. But is this the only option?&lt;/P&gt;&lt;P&gt;Any suggestion or better solution?&lt;BR /&gt;Or can we do it at search time with sonething like " |&amp;nbsp;rex field=ccnumber mode=sed ..."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Oct 2020 20:34:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-we-can-assign-a-default-value-for-empty-tag-with-KV-MODE-xml/m-p/525453#M88718</guid>
      <dc:creator>imgarytan</dc:creator>
      <dc:date>2020-10-19T20:34:01Z</dc:date>
    </item>
    <item>
      <title>Re: how we can assign a default value for empty tag with KV_MODE=xml?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-we-can-assign-a-default-value-for-empty-tag-with-KV-MODE-xml/m-p/525455#M88719</link>
      <description>&lt;P&gt;Or can we maintain the MV index, to have a mv value like below? so if the third tag is empty, then keep the empty value stay in the right index?&lt;BR /&gt;A&lt;BR /&gt;B&lt;/P&gt;&lt;P&gt;D&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Oct 2020 21:00:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-we-can-assign-a-default-value-for-empty-tag-with-KV-MODE-xml/m-p/525455#M88719</guid>
      <dc:creator>imgarytan</dc:creator>
      <dc:date>2020-10-19T21:00:16Z</dc:date>
    </item>
  </channel>
</rss>

