<?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: Splunk XML data formatting in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-XML-data-formatting/m-p/203570#M98760</link>
    <description>&lt;P&gt;Unless this sample is incomplete, I don't see valid XML. If this data is correct, then you can strip out the unwanted data using &lt;CODE&gt;SEDCMD&lt;/CODE&gt; in your &lt;CODE&gt;props.conf&lt;/CODE&gt; like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SEDCMD-removeunwanted=s/(\&amp;lt;.*\&amp;gt;)//g
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.0/Data/Anonymizedatausingconfigurationfiles"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.0/Data/Anonymizedatausingconfigurationfiles&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Now to extract the fields, use the &lt;CODE&gt;DELIMS&lt;/CODE&gt; in your &lt;CODE&gt;transforms&lt;/CODE&gt;... like so&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[extract_fields]
DELIMS = ";"
FIELDS = "ename", "position", "branch"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.1/admin/Transformsconf"&gt;http://docs.splunk.com/Documentation/Splunk/6.1/admin/Transformsconf&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 31 Dec 2015 00:54:07 GMT</pubDate>
    <dc:creator>sundareshr</dc:creator>
    <dc:date>2015-12-31T00:54:07Z</dc:date>
    <item>
      <title>Splunk XML data formatting</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-XML-data-formatting/m-p/203569#M98759</link>
      <description>&lt;P&gt;I trying to split the xml data while pushing into splunk. I had a tough time working on this as this a combination of XML and CSV format.&lt;/P&gt;

&lt;P&gt;Input: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;10:26:10 PST 16 Nov 2015
    &amp;lt;employee details="ename;position;branch" department="XYZ"&amp;gt;AA;systems engineer;seattle
&amp;lt;/employee&amp;gt;

1:26:10 PST 16 Nov 2015
    &amp;lt;employee details="ename;position;branch" department="XYZ"&amp;gt;BB;Lead;seattle
CC;Tech Lead,Redmond    
&amp;lt;/employee&amp;gt;

6:26:10 PST 16 Nov 2015
    &amp;lt;employee details="ename;position;branch" department="XYZ"&amp;gt;DD;data architect;annapolis
&amp;lt;/employee&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Expected Output:&lt;/P&gt;

&lt;P&gt;ename                   position                         branch&lt;BR /&gt;
AA                   systems engineer                 seattle&lt;BR /&gt;
BB                   Lead                                        seattle&lt;BR /&gt;
CC                   Tech Lead                              Redmond &lt;BR /&gt;
DD                  data architect                        annapolis&lt;/P&gt;</description>
      <pubDate>Thu, 31 Dec 2015 00:03:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-XML-data-formatting/m-p/203569#M98759</guid>
      <dc:creator>smusunuri1</dc:creator>
      <dc:date>2015-12-31T00:03:39Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk XML data formatting</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-XML-data-formatting/m-p/203570#M98760</link>
      <description>&lt;P&gt;Unless this sample is incomplete, I don't see valid XML. If this data is correct, then you can strip out the unwanted data using &lt;CODE&gt;SEDCMD&lt;/CODE&gt; in your &lt;CODE&gt;props.conf&lt;/CODE&gt; like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SEDCMD-removeunwanted=s/(\&amp;lt;.*\&amp;gt;)//g
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.0/Data/Anonymizedatausingconfigurationfiles"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.0/Data/Anonymizedatausingconfigurationfiles&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Now to extract the fields, use the &lt;CODE&gt;DELIMS&lt;/CODE&gt; in your &lt;CODE&gt;transforms&lt;/CODE&gt;... like so&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[extract_fields]
DELIMS = ";"
FIELDS = "ename", "position", "branch"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.1/admin/Transformsconf"&gt;http://docs.splunk.com/Documentation/Splunk/6.1/admin/Transformsconf&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Dec 2015 00:54:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-XML-data-formatting/m-p/203570#M98760</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2015-12-31T00:54:07Z</dc:date>
    </item>
  </channel>
</rss>

