<?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: Replacing Xml header at search time in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Replacing-Xml-header-at-search-time/m-p/523929#M147823</link>
    <description>&lt;LI-CODE lang="markup"&gt;index=_internal | head 1 | fields _raw _time | eval _raw="&amp;lt;ProductionPerformance xmlns:xsd=http://www.w3.org/2001/XMLSchema xmlns:Extended=http://www.wbf.org/xml/B2MML-V0401-AllExtensions xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xmlns=http://www.wbf.org/xml/B2MML-V0401&amp;gt;"
| rex mode=sed "s/xmlns.*&amp;gt;/&amp;gt;/"&lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 09 Oct 2020 13:53:08 GMT</pubDate>
    <dc:creator>to4kawa</dc:creator>
    <dc:date>2020-10-09T13:53:08Z</dc:date>
    <item>
      <title>Replacing Xml header at search time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Replacing-Xml-header-at-search-time/m-p/523904#M147810</link>
      <description>&lt;P&gt;i want to remove the header tag in the xml during search time as it was not properly quoted also,&amp;nbsp;&lt;/P&gt;&lt;P&gt;please help with the command&lt;/P&gt;&lt;P&gt;Have to remove this tag from data durring search time&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;lt;?xml version=1.0 encoding=utf-8?&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/127939"&gt;@kamlesh_vaghela&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;?xml version=1.0 encoding=utf-8?&amp;gt;&amp;lt;Material&amp;gt;&amp;lt;ID&amp;gt;1&amp;lt;/ID&amp;gt;&amp;lt;Equip&amp;gt;001&amp;lt;/Equip&amp;gt;&amp;lt;Date&amp;gt;20201009&amp;lt;/Date&amp;gt;&amp;lt;Posting&amp;gt;20201009&amp;lt;/Posting&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Oct 2020 12:41:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Replacing-Xml-header-at-search-time/m-p/523904#M147810</guid>
      <dc:creator>DataOrg</dc:creator>
      <dc:date>2020-10-09T12:41:02Z</dc:date>
    </item>
    <item>
      <title>Re: Replacing Xml header at search time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Replacing-Xml-header-at-search-time/m-p/523909#M147812</link>
      <description>&lt;LI-CODE lang="markup"&gt;| rex mode=sed "s/\&amp;lt;\?xml version=1\.0 encoding=utf-8\?\&amp;gt;//g"&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 09 Oct 2020 12:52:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Replacing-Xml-header-at-search-time/m-p/523909#M147812</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-10-09T12:52:48Z</dc:date>
    </item>
    <item>
      <title>Re: Replacing Xml header at search time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Replacing-Xml-header-at-search-time/m-p/523911#M147813</link>
      <description>&lt;LI-CODE lang="markup"&gt;index=_internal | head 1 | fields _raw _time | eval _raw="&amp;lt;?xml version=1.0 encoding=utf-8?&amp;gt;&amp;lt;Material&amp;gt;&amp;lt;ID&amp;gt;1&amp;lt;/ID&amp;gt;&amp;lt;Equip&amp;gt;001&amp;lt;/Equip&amp;gt;&amp;lt;Date&amp;gt;20201009&amp;lt;/Date&amp;gt;&amp;lt;Posting&amp;gt;20201009&amp;lt;/Posting&amp;gt;" | xmlkv&lt;/LI-CODE&gt;&lt;P&gt;how about this?&lt;/P&gt;</description>
      <pubDate>Fri, 09 Oct 2020 12:56:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Replacing-Xml-header-at-search-time/m-p/523911#M147813</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-10-09T12:56:50Z</dc:date>
    </item>
    <item>
      <title>Re: Replacing Xml header at search time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Replacing-Xml-header-at-search-time/m-p/523914#M147816</link>
      <description>&lt;P&gt;I dont need transformation, i just need to remove the header&lt;/P&gt;</description>
      <pubDate>Fri, 09 Oct 2020 13:01:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Replacing-Xml-header-at-search-time/m-p/523914#M147816</guid>
      <dc:creator>DataOrg</dc:creator>
      <dc:date>2020-10-09T13:01:58Z</dc:date>
    </item>
    <item>
      <title>Re: Replacing Xml header at search time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Replacing-Xml-header-at-search-time/m-p/523917#M147817</link>
      <description>&lt;P&gt;That's what the mode=sed does in my response&lt;/P&gt;</description>
      <pubDate>Fri, 09 Oct 2020 13:03:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Replacing-Xml-header-at-search-time/m-p/523917#M147817</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-10-09T13:03:49Z</dc:date>
    </item>
    <item>
      <title>Re: Replacing Xml header at search time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Replacing-Xml-header-at-search-time/m-p/523928#M147822</link>
      <description>&lt;P&gt;i need to remove only the xml header but i need the &amp;lt;ProductionPerformance&amp;gt; tag&lt;BR /&gt;&amp;lt; xmlns:xsd=&lt;A href="http://www.w3.org/2001/XMLSchema" target="_blank"&gt;http://www.w3.org/2001/XMLSchema&lt;/A&gt; xmlns:Extended=&lt;A href="http://www.wbf.org/xml/B2MML-V0401-AllExtensions" target="_blank"&gt;http://www.wbf.org/xml/B2MML-V0401-AllExtensions&lt;/A&gt; xmlns:xsi=&lt;A href="http://www.w3.org/2001/XMLSchema-instance" target="_blank"&gt;http://www.w3.org/2001/XMLSchema-instance&lt;/A&gt; xmlns=&lt;A href="http://www.wbf.org/xml/B2MML-V0401" target="_blank"&gt;http://www.wbf.org/xml/B2MML-V0401&lt;/A&gt;&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;ProductionPerformance xmlns:xsd=http://www.w3.org/2001/XMLSchema xmlns:Extended=http://www.wbf.org/xml/B2MML-V0401-AllExtensions xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xmlns=http://www.wbf.org/xml/B2MML-V0401&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Oct 2020 13:44:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Replacing-Xml-header-at-search-time/m-p/523928#M147822</guid>
      <dc:creator>DataOrg</dc:creator>
      <dc:date>2020-10-09T13:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: Replacing Xml header at search time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Replacing-Xml-header-at-search-time/m-p/523929#M147823</link>
      <description>&lt;LI-CODE lang="markup"&gt;index=_internal | head 1 | fields _raw _time | eval _raw="&amp;lt;ProductionPerformance xmlns:xsd=http://www.w3.org/2001/XMLSchema xmlns:Extended=http://www.wbf.org/xml/B2MML-V0401-AllExtensions xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xmlns=http://www.wbf.org/xml/B2MML-V0401&amp;gt;"
| rex mode=sed "s/xmlns.*&amp;gt;/&amp;gt;/"&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 09 Oct 2020 13:53:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Replacing-Xml-header-at-search-time/m-p/523929#M147823</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-10-09T13:53:08Z</dc:date>
    </item>
    <item>
      <title>Re: Replacing Xml header at search time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Replacing-Xml-header-at-search-time/m-p/523935#M147826</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/184221"&gt;@to4kawa&lt;/a&gt;&amp;nbsp;it removes other upcoming data tags also, i just want to remove xmls content from the &amp;lt;ProductionPerformance&amp;gt; tag&lt;/P&gt;&lt;P&gt;Input event:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;EventData&amp;gt;&amp;lt;ProductionPerformance xmlns:xsd=http://www.w3.org/2001/XMLSchema xmlns:Extended=http://www.wbf.org/xml/B2MML-V0401-AllExtensions xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xmlns=http://www.wbf.org/xml/B2MML-V0401&amp;gt;&amp;lt;/ProductionPerformance&amp;gt;
&amp;lt;date&amp;gt;21/1/2020&amp;lt;/date&amp;gt;
&amp;lt;Message&amp;gt;Hello&amp;lt;/Message&amp;gt;
&amp;lt;/EventData&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Output i want as&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;EventData&amp;gt;&amp;lt;ProductionPerformance&amp;gt;&amp;lt;/ProductionPerformance&amp;gt;
&amp;lt;date&amp;gt;21/1/2020&amp;lt;/date&amp;gt;
&amp;lt;Message&amp;gt;Hello&amp;lt;/Message&amp;gt;
&amp;lt;/EventData&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 09 Oct 2020 14:05:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Replacing-Xml-header-at-search-time/m-p/523935#M147826</guid>
      <dc:creator>DataOrg</dc:creator>
      <dc:date>2020-10-09T14:05:21Z</dc:date>
    </item>
    <item>
      <title>Re: Replacing Xml header at search time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Replacing-Xml-header-at-search-time/m-p/523939#M147827</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/45389"&gt;@DataOrg&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can have your required part of data during search time by adding below configuration in props.conf.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[YouR_stanZa]
EXTRACT-myData = ^[^&amp;gt;\n]*&amp;gt;(?P&amp;lt;myData&amp;gt;.+)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If in case you want it to be at index time you can use below configuration also.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[YouR_stanZa]
SEDCMD-a=s/(^[^&amp;gt;\n]*&amp;gt;)//g&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this will help you. &amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Please let me know if you have some special scenario.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Happy Splunking&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Oct 2020 14:06:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Replacing-Xml-header-at-search-time/m-p/523939#M147827</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2020-10-09T14:06:08Z</dc:date>
    </item>
    <item>
      <title>Re: Replacing Xml header at search time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Replacing-Xml-header-at-search-time/m-p/523941#M147828</link>
      <description>&lt;LI-CODE lang="markup"&gt;| rex mode=sed "s/\sxmlns(|:\w+)=[^\s\&amp;gt;]+//g"&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 09 Oct 2020 14:12:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Replacing-Xml-header-at-search-time/m-p/523941#M147828</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-10-09T14:12:21Z</dc:date>
    </item>
  </channel>
</rss>

