<?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: parse xml that are more than 900K bytes in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/parse-xml-that-are-more-than-900K-bytes/m-p/136385#M8136</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt;
You can ignore the above xml, this is the sample xml. I wish to mask the content for &lt;CONTENT&gt; and &lt;FOCUS&gt; tag, what is the recommended regex? thks&lt;/FOCUS&gt;&lt;/CONTENT&gt;&lt;/P&gt;

&lt;P&gt;&lt;XML&gt; &lt;/XML&gt;&lt;/P&gt;

&lt;P&gt;&lt;FIELD1&gt;123&lt;/FIELD1&gt; &lt;FIELD2&gt;456&lt;/FIELD2&gt; Not to be forward to indexer &lt;FIELD3&gt;333&lt;/FIELD3&gt; &lt;CONTENT&gt;not to be forward&lt;/CONTENT&gt;&lt;QUERY&gt;this is to be validfsffggetewrwerwerwewff&lt;BR /&gt;
&lt;/QUERY&gt;&lt;FOCUS&gt;1.tetette. 2rerere ererererer3.erererefr&lt;/FOCUS&gt; &lt;STARTDATE&gt;23/4/2014 12:23:232&lt;/STARTDATE&gt; &lt;ENDDATE&gt;23/4/2014 12:24:232&lt;/ENDDATE&gt;&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 23 Apr 2014 03:47:42 GMT</pubDate>
    <dc:creator>SplunkCSIT</dc:creator>
    <dc:date>2014-04-23T03:47:42Z</dc:date>
    <item>
      <title>parse xml that are more than 900K bytes</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/parse-xml-that-are-more-than-900K-bytes/m-p/136382#M8133</link>
      <description>&lt;P&gt;I got alot of more than 900K bytes xml file, i just want to index the first few tags of file within the xml. If my xml file is just less than 20K bytes, the below transforms able to work. But if the file is more than 50K bytes, the below transforms will not work. Any other alternative? The one alternative that i can think of is to write a batch script to remove the body and the content tag from the xml file before it go thru the splunk. I dont really know how to write a batch script. Any other easier suggestion? thks&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;P&gt;[xmlFilter1]&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;KV_MODE = xml
BREAK_ONLY_BEFORE = &amp;lt;xml&amp;gt;
SHOULD_LINEMERGE = false
NO_BINARY_CHECK = 1
pulldown_type = 1
TRUNCATE = 1000000000000
MAX_EVENTS = 1000000000000
TRANSFORMS-test1 = body, content
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[body]
LOOKAHEAD = 1000000000000
SOURCE_KEY=_raw
REGEX=(.*?)\&amp;lt;body\&amp;gt;.*?\&amp;lt;/body\&amp;gt;(.*)
DEST_KEY=_raw
FORMAT=$1&amp;lt;body&amp;gt;####&amp;lt;/body&amp;gt;$2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;[content]&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;LOOKAHEAD = 1000000000000
SOURCE_KEY=_raw
REGEX=(.*?)\&amp;lt;content\&amp;gt;.*?\&amp;lt;/content\&amp;gt;(.*)
DEST_KEY=_raw
FORMAT=$1&amp;lt;content&amp;gt;*******&amp;lt;/content&amp;gt;$2
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 19 Apr 2014 05:41:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/parse-xml-that-are-more-than-900K-bytes/m-p/136382#M8133</guid>
      <dc:creator>SplunkCSIT</dc:creator>
      <dc:date>2014-04-19T05:41:06Z</dc:date>
    </item>
    <item>
      <title>Re: parse xml that are more than 900K bytes</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/parse-xml-that-are-more-than-900K-bytes/m-p/136383#M8134</link>
      <description>&lt;P&gt;It would help if we could see a bit of the file (you could remove the content and just show the tags with a little gibberish between them).&lt;/P&gt;</description>
      <pubDate>Sun, 20 Apr 2014 17:01:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/parse-xml-that-are-more-than-900K-bytes/m-p/136383#M8134</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2014-04-20T17:01:20Z</dc:date>
    </item>
    <item>
      <title>Re: parse xml that are more than 900K bytes</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/parse-xml-that-are-more-than-900K-bytes/m-p/136384#M8135</link>
      <description>&lt;P&gt;One suggestion: in &lt;CODE&gt;props.conf&lt;/CODE&gt;, set &lt;CODE&gt;TRUNCATE = 0&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 20 Apr 2014 17:04:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/parse-xml-that-are-more-than-900K-bytes/m-p/136384#M8135</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2014-04-20T17:04:26Z</dc:date>
    </item>
    <item>
      <title>Re: parse xml that are more than 900K bytes</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/parse-xml-that-are-more-than-900K-bytes/m-p/136385#M8136</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
You can ignore the above xml, this is the sample xml. I wish to mask the content for &lt;CONTENT&gt; and &lt;FOCUS&gt; tag, what is the recommended regex? thks&lt;/FOCUS&gt;&lt;/CONTENT&gt;&lt;/P&gt;

&lt;P&gt;&lt;XML&gt; &lt;/XML&gt;&lt;/P&gt;

&lt;P&gt;&lt;FIELD1&gt;123&lt;/FIELD1&gt; &lt;FIELD2&gt;456&lt;/FIELD2&gt; Not to be forward to indexer &lt;FIELD3&gt;333&lt;/FIELD3&gt; &lt;CONTENT&gt;not to be forward&lt;/CONTENT&gt;&lt;QUERY&gt;this is to be validfsffggetewrwerwerwewff&lt;BR /&gt;
&lt;/QUERY&gt;&lt;FOCUS&gt;1.tetette. 2rerere ererererer3.erererefr&lt;/FOCUS&gt; &lt;STARTDATE&gt;23/4/2014 12:23:232&lt;/STARTDATE&gt; &lt;ENDDATE&gt;23/4/2014 12:24:232&lt;/ENDDATE&gt;&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Apr 2014 03:47:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/parse-xml-that-are-more-than-900K-bytes/m-p/136385#M8136</guid>
      <dc:creator>SplunkCSIT</dc:creator>
      <dc:date>2014-04-23T03:47:42Z</dc:date>
    </item>
    <item>
      <title>Re: parse xml that are more than 900K bytes</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/parse-xml-that-are-more-than-900K-bytes/m-p/136386#M8137</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
You can ignore the above xml, this is the sample xml. I wish to mask the content for &lt;CONTENT&gt; and &lt;FOCUS&gt; tag, what is the recommended regex? thks&lt;BR /&gt;
&lt;XML&gt; &lt;BR /&gt;
&lt;FIELD1&gt;123&lt;/FIELD1&gt; &lt;FIELD2&gt;456&lt;/FIELD2&gt; Not to be forward to indexer &lt;FIELD3&gt;333&lt;/FIELD3&gt; &lt;CONTENT&gt;not to be forward&lt;/CONTENT&gt;&lt;QUERY&gt;this is to be validfsffggetewrwerwerwewff&lt;BR /&gt;
&lt;/QUERY&gt;&lt;FOCUS&gt;1.tetette. 2rerere ererererer3.erererefr&lt;/FOCUS&gt; &lt;STARTDATE&gt;23/4/2014 12:23:232&lt;/STARTDATE&gt; &lt;ENDDATE&gt;23/4/2014 12:24:232&lt;/ENDDATE&gt;&lt;BR /&gt;
&lt;/XML&gt;&lt;/FOCUS&gt;&lt;/CONTENT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Apr 2014 12:48:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/parse-xml-that-are-more-than-900K-bytes/m-p/136386#M8137</guid>
      <dc:creator>SplunkCSIT</dc:creator>
      <dc:date>2014-04-23T12:48:59Z</dc:date>
    </item>
  </channel>
</rss>

