<?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 can I include greater/less than signs in a search in my app's simple xml view in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-include-greater-less-than-signs-in-a-search-in-my-app/m-p/10320#M46</link>
    <description>&lt;P&gt;I'm trying to build a view that has a bunch of charts on it. I thought that finally I had something that the simple xml might be able to handle, but I'm again having trouble.&lt;/P&gt;

&lt;P&gt;The problem comes from the fact that my search uses rex to extract a number of fields. rex syntax uses greater- and less-than signs, which Splunk doesn't appear to like.&lt;/P&gt;

&lt;P&gt;When I try to update the xml in the manager (as per below), it gives an error "Encountered the following error while trying to update: In handler 'views': Not valid XML:"&lt;/P&gt;

&lt;P&gt;Is there a way I can get around this? Is it a bug?&lt;/P&gt;

&lt;P&gt;
&lt;CODE&gt;&amp;lt;?xml version='1.0' encoding='utf-8'?&amp;gt;
&amp;lt;dashboard&amp;gt;
  &amp;lt;label&amp;gt;Order statistics from Oracle&amp;lt;/label&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;chart&amp;gt;
      &amp;lt;searchString&amp;gt;sourcetype=ORAExtendedOrderHistory* | rex "(?&amp;lt;sample_date&amp;gt;.*?),(?&amp;lt;channel&amp;gt;\w*),(?&amp;lt;booking_system&amp;gt;\w*),(?&amp;lt;Orders&amp;gt;\d*),(?&amp;lt;StopAndLimit&amp;gt;\d*),(?&amp;lt;WorkingOrder&amp;gt;\d*),(?&amp;lt;TotalOrders&amp;gt;\d*),(?&amp;lt;avgRoundTrip&amp;gt;\d*),(?&amp;lt;minRoundTrip&amp;gt;\d*),(?&amp;lt;maxRoundTrip&amp;gt;\d*),(?&amp;lt;avgWeblogic&amp;gt;\d*),(?&amp;lt;minWebLogic&amp;gt;\d*),(?&amp;lt;maxWeblogic&amp;gt;\d*),(?&amp;lt;avgBookingSystem&amp;gt;\d*),(?&amp;lt;minBookingSystem&amp;gt;\d*),(?&amp;lt;maxBookingSystem&amp;gt;\d*)" | search channel=WEB OR channel=MOBILE OR channel=L23G OR channel=iPhone | timechart span=1m sum(TotalOrders) by channel&amp;lt;/searchString&amp;gt;
      &amp;lt;earliestTime&amp;gt;-5h&amp;lt;/earliestTime&amp;gt;
      &amp;lt;option name="charting.chart"&amp;gt;area&amp;lt;/option&amp;gt;
      &amp;lt;option name="charting.chartTitle"&amp;gt;Total number of Orders&amp;lt;/option&amp;gt;
      &amp;lt;option name="charting.primaryAxisTitle.text"&amp;gt;Time&amp;lt;/option&amp;gt;
      &amp;lt;option name="charting.secondaryAxisTitle.text"&amp;gt;Order count&amp;lt;/option&amp;gt;
    &amp;lt;/chart&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/dashboard&amp;gt;&lt;/CODE&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 20 Mar 2010 00:41:57 GMT</pubDate>
    <dc:creator>Glenn</dc:creator>
    <dc:date>2010-03-20T00:41:57Z</dc:date>
    <item>
      <title>How can I include greater/less than signs in a search in my app's simple xml view</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-include-greater-less-than-signs-in-a-search-in-my-app/m-p/10320#M46</link>
      <description>&lt;P&gt;I'm trying to build a view that has a bunch of charts on it. I thought that finally I had something that the simple xml might be able to handle, but I'm again having trouble.&lt;/P&gt;

&lt;P&gt;The problem comes from the fact that my search uses rex to extract a number of fields. rex syntax uses greater- and less-than signs, which Splunk doesn't appear to like.&lt;/P&gt;

&lt;P&gt;When I try to update the xml in the manager (as per below), it gives an error "Encountered the following error while trying to update: In handler 'views': Not valid XML:"&lt;/P&gt;

&lt;P&gt;Is there a way I can get around this? Is it a bug?&lt;/P&gt;

&lt;P&gt;
&lt;CODE&gt;&amp;lt;?xml version='1.0' encoding='utf-8'?&amp;gt;
&amp;lt;dashboard&amp;gt;
  &amp;lt;label&amp;gt;Order statistics from Oracle&amp;lt;/label&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;chart&amp;gt;
      &amp;lt;searchString&amp;gt;sourcetype=ORAExtendedOrderHistory* | rex "(?&amp;lt;sample_date&amp;gt;.*?),(?&amp;lt;channel&amp;gt;\w*),(?&amp;lt;booking_system&amp;gt;\w*),(?&amp;lt;Orders&amp;gt;\d*),(?&amp;lt;StopAndLimit&amp;gt;\d*),(?&amp;lt;WorkingOrder&amp;gt;\d*),(?&amp;lt;TotalOrders&amp;gt;\d*),(?&amp;lt;avgRoundTrip&amp;gt;\d*),(?&amp;lt;minRoundTrip&amp;gt;\d*),(?&amp;lt;maxRoundTrip&amp;gt;\d*),(?&amp;lt;avgWeblogic&amp;gt;\d*),(?&amp;lt;minWebLogic&amp;gt;\d*),(?&amp;lt;maxWeblogic&amp;gt;\d*),(?&amp;lt;avgBookingSystem&amp;gt;\d*),(?&amp;lt;minBookingSystem&amp;gt;\d*),(?&amp;lt;maxBookingSystem&amp;gt;\d*)" | search channel=WEB OR channel=MOBILE OR channel=L23G OR channel=iPhone | timechart span=1m sum(TotalOrders) by channel&amp;lt;/searchString&amp;gt;
      &amp;lt;earliestTime&amp;gt;-5h&amp;lt;/earliestTime&amp;gt;
      &amp;lt;option name="charting.chart"&amp;gt;area&amp;lt;/option&amp;gt;
      &amp;lt;option name="charting.chartTitle"&amp;gt;Total number of Orders&amp;lt;/option&amp;gt;
      &amp;lt;option name="charting.primaryAxisTitle.text"&amp;gt;Time&amp;lt;/option&amp;gt;
      &amp;lt;option name="charting.secondaryAxisTitle.text"&amp;gt;Order count&amp;lt;/option&amp;gt;
    &amp;lt;/chart&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/dashboard&amp;gt;&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 20 Mar 2010 00:41:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-include-greater-less-than-signs-in-a-search-in-my-app/m-p/10320#M46</guid>
      <dc:creator>Glenn</dc:creator>
      <dc:date>2010-03-20T00:41:57Z</dc:date>
    </item>
    <item>
      <title>Re: How can I include greater/less than signs in a search in my app's simple xml view</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-include-greater-less-than-signs-in-a-search-in-my-app/m-p/10321#M47</link>
      <description>&lt;P&gt;Try &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;CODE&gt;&amp;amp;gt;&lt;/CODE&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;(which is "&lt;CODE&gt;&amp;gt;&lt;/CODE&gt;") and &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;CODE&gt;&amp;amp;lt;&lt;/CODE&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;(which is "&lt;CODE&gt;&amp;lt;&lt;/CODE&gt;").&lt;/P&gt;</description>
      <pubDate>Sat, 20 Mar 2010 00:54:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-include-greater-less-than-signs-in-a-search-in-my-app/m-p/10321#M47</guid>
      <dc:creator>V_at_Splunk</dc:creator>
      <dc:date>2010-03-20T00:54:00Z</dc:date>
    </item>
    <item>
      <title>Re: How can I include greater/less than signs in a search in my app's simple xml view</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-include-greater-less-than-signs-in-a-search-in-my-app/m-p/10322#M48</link>
      <description>&lt;P&gt;You need to encode it to be considered completely valid XML. This means either enclosing text in a CDATA&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;![CDATA[questionalble text that includes &amp;lt; and &amp;gt; and &amp;amp; characters]]&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or XML-encoding it, which, if you want to be guaranteed to avoid problems, means encoding &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt; as &amp;amp;lt;
&amp;gt; as &amp;amp;gt;
&amp;amp; as &amp;amp;amp;
" as &amp;amp;quot;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Most XML parsers will tolerate some of these characters in some data, but not always and not conistently from parser to parser.&lt;/P&gt;</description>
      <pubDate>Sat, 20 Mar 2010 01:34:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-include-greater-less-than-signs-in-a-search-in-my-app/m-p/10322#M48</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2010-03-20T01:34:06Z</dc:date>
    </item>
    <item>
      <title>Re: How can I include greater/less than signs in a search in my app's simple xml view</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-include-greater-less-than-signs-in-a-search-in-my-app/m-p/10323#M49</link>
      <description>&lt;P&gt;I tried the CDATA option at least, as it was less work than converting each character, and it works fine. Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 22 Mar 2010 22:00:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-include-greater-less-than-signs-in-a-search-in-my-app/m-p/10323#M49</guid>
      <dc:creator>Glenn</dc:creator>
      <dc:date>2010-03-22T22:00:44Z</dc:date>
    </item>
    <item>
      <title>Re: How can I include greater/less than signs in a search in my app's simple xml view</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-include-greater-less-than-signs-in-a-search-in-my-app/m-p/10324#M50</link>
      <description>&lt;P&gt;The best way to handle similar kind of special character issue is by using Macro in splunk.&lt;BR /&gt;
Follow the link&lt;BR /&gt;
Manager » Advanced search &amp;gt;&amp;gt;New Macro&lt;/P&gt;

&lt;P&gt;You can find the manager listed at top right corner of your splunk search window.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jun 2011 05:48:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-include-greater-less-than-signs-in-a-search-in-my-app/m-p/10324#M50</guid>
      <dc:creator>rkanalyst</dc:creator>
      <dc:date>2011-06-24T05:48:44Z</dc:date>
    </item>
    <item>
      <title>Re: How can I include greater/less than signs in a search in my app's simple xml view</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-include-greater-less-than-signs-in-a-search-in-my-app/m-p/563959#M46392</link>
      <description>&lt;P&gt;Greetings,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Found this post which is similar to the issue we're experiencing in a Dashboard that contains regex/rex.&amp;nbsp; &amp;nbsp;We've tried the [CDATA] option and replacing &amp;lt;&amp;gt; with &amp;amp;gt and &amp;amp;lt.&amp;nbsp; &amp;nbsp;However we're still getting the "Invalid character entity" in the Dashboard.&amp;nbsp; &amp;nbsp;There are the 2 similar rex lines and I think we can get the first line resolved we can resolve the other.&amp;nbsp; Here is the Dashboard rex line:&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;| rex "Member:\s+\w+\s\w+:.*\\\(?&amp;lt;TargetAccount&amp;gt;.*)"&lt;/P&gt;&lt;P&gt;What's need to get rex working in Dashboards?&amp;nbsp; &amp;nbsp;Appreciate any insight and/or feedback.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Aug 2021 13:58:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-include-greater-less-than-signs-in-a-search-in-my-app/m-p/563959#M46392</guid>
      <dc:creator>marceloalejandr</dc:creator>
      <dc:date>2021-08-19T13:58:42Z</dc:date>
    </item>
    <item>
      <title>Re: How can I include greater/less than signs in a search in my app's simple xml view</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-include-greater-less-than-signs-in-a-search-in-my-app/m-p/563960#M46393</link>
      <description>&lt;P&gt;One item to note, when trying to use CDATA as in the example below, the error message changes to "Unexpected close tag".&lt;BR /&gt;| rex "Member:\s+\w+\s\w+:.*\\\[CDATA[(?&amp;lt;TargetAccount&amp;gt;.*)]]"&lt;/P&gt;</description>
      <pubDate>Thu, 19 Aug 2021 14:03:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-include-greater-less-than-signs-in-a-search-in-my-app/m-p/563960#M46393</guid>
      <dc:creator>marceloalejandr</dc:creator>
      <dc:date>2021-08-19T14:03:58Z</dc:date>
    </item>
    <item>
      <title>Re: How can I include greater/less than signs in a search in my app's simple xml view</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-include-greater-less-than-signs-in-a-search-in-my-app/m-p/563962#M46394</link>
      <description>&lt;P&gt;Please disregard this post.&amp;nbsp; I found the issue.&amp;nbsp; The CDATA syntax needed the opening and closing &amp;lt;&amp;gt;.&amp;nbsp;&lt;BR /&gt;| rex &amp;lt;![CDATA["Member:\s+\w+\s\w+:.*\\\(?&amp;lt;TargetAccount&amp;gt;.*)"]]&amp;gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Aug 2021 14:36:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-include-greater-less-than-signs-in-a-search-in-my-app/m-p/563962#M46394</guid>
      <dc:creator>marceloalejandr</dc:creator>
      <dc:date>2021-08-19T14:36:03Z</dc:date>
    </item>
    <item>
      <title>Re: How can I include greater/less than signs in a search in my app's simple xml view</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-include-greater-less-than-signs-in-a-search-in-my-app/m-p/601109#M49373</link>
      <description>&lt;P&gt;I found this post looking for how to get HTML into an alert email, I realise it's an old question but in case it helps anyone:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The SPL:&lt;/P&gt;&lt;P&gt;| makeresults&lt;BR /&gt;| eval rexfield="Member: something else: abcde12345 \myaccountname"&lt;BR /&gt;| rex field=rexfield "Member:\s+\w+\s\w+:.*\\\(?&amp;lt;TargetAccount&amp;gt;.*)"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Translates to XML:&lt;/P&gt;&lt;P&gt;&amp;lt;query&amp;gt;&lt;BR /&gt;| makeresults&lt;BR /&gt;| eval rexfield="Member: something else: abcde12345 \myaccountname"&lt;BR /&gt;| rex field=rexfield "Member:\s+\w+\s\w+:.*\\\(?&amp;amp;lt;TargetAccount&amp;amp;gt;.*)"&lt;BR /&gt;&amp;lt;/query&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jun 2022 05:42:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-include-greater-less-than-signs-in-a-search-in-my-app/m-p/601109#M49373</guid>
      <dc:creator>lindonmorris</dc:creator>
      <dc:date>2022-06-09T05:42:24Z</dc:date>
    </item>
  </channel>
</rss>

