<?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: XML and JSON Data Types in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/XML-and-JSON-Data-Types/m-p/37560#M1734</link>
    <description>&lt;P&gt;Thanks a lot for the great support!&lt;/P&gt;</description>
    <pubDate>Tue, 01 May 2012 19:29:40 GMT</pubDate>
    <dc:creator>shangshin</dc:creator>
    <dc:date>2012-05-01T19:29:40Z</dc:date>
    <item>
      <title>XML and JSON Data Types</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/XML-and-JSON-Data-Types/m-p/37554#M1728</link>
      <description>&lt;P&gt;Hi, I would like to use Splunk to parse xml and json data files and trigger the alert if the element "checked" is false. I would appreciate if you can provide an example on how to set up the field extractors for these 2 data type. Thank You!&lt;/P&gt;

&lt;P&gt;[{&lt;BR /&gt;
    "text": "Products",&lt;BR /&gt;
    "cls": "folder",&lt;BR /&gt;
    "expanded": true,&lt;BR /&gt;
    "children": [{&lt;BR /&gt;
        "text": "iPad",&lt;BR /&gt;
        "leaf": true,&lt;BR /&gt;
        "checked": true        &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;},{
    "text": "iPhone",
    "leaf": true,
    "checked": false       
},{
    "text": "iPod",
    "leaf": true,
    "checked": true      
}
]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;}]   &lt;/P&gt;</description>
      <pubDate>Thu, 26 Apr 2012 18:39:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/XML-and-JSON-Data-Types/m-p/37554#M1728</guid>
      <dc:creator>shangshin</dc:creator>
      <dc:date>2012-04-26T18:39:48Z</dc:date>
    </item>
    <item>
      <title>Re: XML and JSON Data Types</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/XML-and-JSON-Data-Types/m-p/37555#M1729</link>
      <description>&lt;P&gt;Examples here using the spath command.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/4.3.2/SearchReference/Spath"&gt;http://docs.splunk.com/Documentation/Splunk/4.3.2/SearchReference/Spath&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;When you add an output it creates that field so you have the extracted value.&lt;/P&gt;

&lt;P&gt;| spath output=myloc path=vendorproductset.product.desc.locdesc{4}{@locale}&lt;/P&gt;</description>
      <pubDate>Thu, 26 Apr 2012 18:41:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/XML-and-JSON-Data-Types/m-p/37555#M1729</guid>
      <dc:creator>sdaniels</dc:creator>
      <dc:date>2012-04-26T18:41:14Z</dc:date>
    </item>
    <item>
      <title>Re: XML and JSON Data Types</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/XML-and-JSON-Data-Types/m-p/37556#M1730</link>
      <description>&lt;P&gt;I am following the example to add the sample xml "vendorProductSet" as the new search data.&lt;BR /&gt;
However, when I entered the string string&lt;BR /&gt;
sourcetype="sample_xml" | spath path=vendorProductSet.product.desc.locDesc{4}{@locale}&lt;BR /&gt;
I didn't not see it extracts the attribute of the 4th locDesc (ca)&lt;BR /&gt;
Instead, I got the whole xml returned from search result.&lt;/P&gt;

&lt;P&gt;Am I missing anything?&lt;/P&gt;</description>
      <pubDate>Thu, 26 Apr 2012 20:26:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/XML-and-JSON-Data-Types/m-p/37556#M1730</guid>
      <dc:creator>shangshin</dc:creator>
      <dc:date>2012-04-26T20:26:59Z</dc:date>
    </item>
    <item>
      <title>Re: XML and JSON Data Types</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/XML-and-JSON-Data-Types/m-p/37557#M1731</link>
      <description>&lt;P&gt;Hey shangshin...sorry for the delay.  I didn't realize you were working on the test xml data. If you add an output, it will add your result as a new field.   You'll see the field added in the bottom left under field discovery.  That's the value you can now use. The whole event comes back since you matched it in your search. Now you can | to a new command with the ability to use your extracted value.&lt;/P&gt;

&lt;P&gt;| spath output=myloc path=vendorproductset.product.desc.locdesc{4}{@locale}&lt;/P&gt;</description>
      <pubDate>Mon, 30 Apr 2012 22:54:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/XML-and-JSON-Data-Types/m-p/37557#M1731</guid>
      <dc:creator>sdaniels</dc:creator>
      <dc:date>2012-04-30T22:54:49Z</dc:date>
    </item>
    <item>
      <title>Re: XML and JSON Data Types</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/XML-and-JSON-Data-Types/m-p/37558#M1732</link>
      <description>&lt;P&gt;Hi, thanks for the reply. &lt;BR /&gt;
I entered the search string below but didn't find the result as a new field "myloc". I also clicked on the link "View all 14 fields" but still no luck.&lt;BR /&gt;
sourcetype="sample_xml" | spath output=myloc path=vendorproductset.product.desc.locdesc{1}{@locale}&lt;/P&gt;

&lt;P&gt;Can you upload a screenshot if possible?&lt;/P&gt;

&lt;P&gt;Basically, we would like to use splunk to monitor a dynamic xml file and trigger the alert if the element value matches.&lt;/P&gt;</description>
      <pubDate>Tue, 01 May 2012 14:06:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/XML-and-JSON-Data-Types/m-p/37558#M1732</guid>
      <dc:creator>shangshin</dc:creator>
      <dc:date>2012-05-01T14:06:07Z</dc:date>
    </item>
    <item>
      <title>Re: XML and JSON Data Types</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/XML-and-JSON-Data-Types/m-p/37559#M1733</link>
      <description>&lt;P&gt;I don't have a web server to put up a screenshot, and you can't just paste them in here as far as i can tell.  Email me and I can send it to you.&lt;/P&gt;</description>
      <pubDate>Tue, 01 May 2012 15:06:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/XML-and-JSON-Data-Types/m-p/37559#M1733</guid>
      <dc:creator>sdaniels</dc:creator>
      <dc:date>2012-05-01T15:06:00Z</dc:date>
    </item>
    <item>
      <title>Re: XML and JSON Data Types</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/XML-and-JSON-Data-Types/m-p/37560#M1734</link>
      <description>&lt;P&gt;Thanks a lot for the great support!&lt;/P&gt;</description>
      <pubDate>Tue, 01 May 2012 19:29:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/XML-and-JSON-Data-Types/m-p/37560#M1734</guid>
      <dc:creator>shangshin</dc:creator>
      <dc:date>2012-05-01T19:29:40Z</dc:date>
    </item>
  </channel>
</rss>

