<?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: Clarification on xmlkv command in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Clarification-on-xmlkv-command/m-p/176926#M186737</link>
    <description>&lt;P&gt;Hi Jananee_iNautix,&lt;/P&gt;

&lt;P&gt;this is no problem of the xmlkv command, but a problem of your field name. Take this run everywhere command as example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal earliest=-1m | head 1 | eval Foo:boo="my foo" | eval myFoo='Foo:boo' | table Foo:boo myFoo
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;this will work because I quoted the field name &lt;CODE&gt;'Foo:boo'&lt;/CODE&gt; and Splunk will no longer interpret the : as operator. Where as &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal earliest=-1m | head 1 | eval Foo:boo="my foo" | eval myFoo=Foo:boo | table Foo:boo myFoo
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;will bring your error.&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
    <pubDate>Fri, 23 May 2014 13:36:52 GMT</pubDate>
    <dc:creator>MuS</dc:creator>
    <dc:date>2014-05-23T13:36:52Z</dc:date>
    <item>
      <title>Clarification on xmlkv command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Clarification-on-xmlkv-command/m-p/176924#M186735</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;

&lt;P&gt;I have a set of logs in xml format.Since the logs are xml formatted &lt;STRONG&gt;xmlkv&lt;/STRONG&gt; command was used .As per the property of the log,the command creates fields as key value pairs from the logs.For example "Sw:Logicalname" is the field that splunk extracted based on the xmlkv command.When I wanted to perform maniputlations on that field using "eval" command,the following error was displayed&lt;BR /&gt;
⚠ Error in 'eval' command: The operator at ':LogicalName' is invalid. &lt;/P&gt;

&lt;P&gt;Can someone resolve this or suggest anyother idea to handle this&lt;/P&gt;</description>
      <pubDate>Fri, 23 May 2014 13:09:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Clarification-on-xmlkv-command/m-p/176924#M186735</guid>
      <dc:creator>Jananee_iNautix</dc:creator>
      <dc:date>2014-05-23T13:09:25Z</dc:date>
    </item>
    <item>
      <title>Re: Clarification on xmlkv command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Clarification-on-xmlkv-command/m-p/176925#M186736</link>
      <description>&lt;P&gt;Try this.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| stats count | eval _raw="&amp;lt;sw:Test&amp;gt;&amp;lt;sw:Name&amp;gt;FirstName&amp;lt;/sw:Name&amp;gt;&amp;lt;sw:ID&amp;gt;123&amp;lt;/sw:ID&amp;gt;&amp;lt;/sw:Test&amp;gt;" | xmlkv | eval "sw:Name"='sw:Name'+" LastName"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;basically, use the fieldname within double qoutes on left side of the "=" (when referring to field) and use fieldname within single quotes on right side of "=" (when referring to value)&lt;/P&gt;</description>
      <pubDate>Fri, 23 May 2014 13:30:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Clarification-on-xmlkv-command/m-p/176925#M186736</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-05-23T13:30:02Z</dc:date>
    </item>
    <item>
      <title>Re: Clarification on xmlkv command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Clarification-on-xmlkv-command/m-p/176926#M186737</link>
      <description>&lt;P&gt;Hi Jananee_iNautix,&lt;/P&gt;

&lt;P&gt;this is no problem of the xmlkv command, but a problem of your field name. Take this run everywhere command as example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal earliest=-1m | head 1 | eval Foo:boo="my foo" | eval myFoo='Foo:boo' | table Foo:boo myFoo
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;this will work because I quoted the field name &lt;CODE&gt;'Foo:boo'&lt;/CODE&gt; and Splunk will no longer interpret the : as operator. Where as &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal earliest=-1m | head 1 | eval Foo:boo="my foo" | eval myFoo=Foo:boo | table Foo:boo myFoo
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;will bring your error.&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Fri, 23 May 2014 13:36:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Clarification-on-xmlkv-command/m-p/176926#M186737</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2014-05-23T13:36:52Z</dc:date>
    </item>
    <item>
      <title>Re: Clarification on xmlkv command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Clarification-on-xmlkv-command/m-p/176927#M186738</link>
      <description>&lt;P&gt;HeHe, I was typing for too long &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 23 May 2014 13:38:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Clarification-on-xmlkv-command/m-p/176927#M186738</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2014-05-23T13:38:05Z</dc:date>
    </item>
  </channel>
</rss>

