<?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 Parsing using SPath in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Parsing-using-SPath/m-p/242901#M15085</link>
    <description>&lt;P&gt;I don't think so the spath command supports attribute name based field reference. &lt;/P&gt;

&lt;P&gt;Give this workaround a shot&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search | rex mode=sed "s/(\&amp;lt;Data Name=\")([^\"]+)(\"\&amp;gt;)([^\&amp;lt;]+)(\&amp;lt;\/Data\&amp;gt;)/&amp;lt;\2&amp;gt;\4&amp;lt;\2&amp;gt;/g"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;See this runanywhere sample&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| gentimes start=-1 | eval _raw="&amp;lt;Event&amp;gt;&amp;lt;EventData&amp;gt;&amp;lt;Data Name=\"name1\"&amp;gt;value1&amp;lt;/Data&amp;gt;&amp;lt;Data Name=\"name2\"&amp;gt;value2&amp;lt;/Data&amp;gt;&amp;lt;/EventData&amp;gt;&amp;lt;/Event&amp;gt;" | table _raw | eval temp=_raw| rex mode=sed "s/(\&amp;lt;Data Name=\")([^\"]+)(\"\&amp;gt;)([^\&amp;lt;]+)(\&amp;lt;\/Data\&amp;gt;)/&amp;lt;\2&amp;gt;\4&amp;lt;\2&amp;gt;/g" | spath input=_raw
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 23 Aug 2016 15:53:57 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2016-08-23T15:53:57Z</dc:date>
    <item>
      <title>XML Parsing using SPath</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Parsing-using-SPath/m-p/242899#M15083</link>
      <description>&lt;P&gt;My Windows security event looks like below&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/1755iA1DB3198BEA450C5/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;I want to get the value of element Data based on specific Name attribute. I can get this by spcifying index as below&lt;BR /&gt;
| spath output=test path="Event.EventData.Data{2}" &lt;BR /&gt;
| spath output=test path="Event.EventData.Data{3}"&lt;/P&gt;

&lt;P&gt;But instead of value 2 or 3, I want to use a name as MemberSid or TargetDomainName. Can anyone help me to define path for this?&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2016 15:14:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Parsing-using-SPath/m-p/242899#M15083</guid>
      <dc:creator>shan_santosh</dc:creator>
      <dc:date>2016-08-23T15:14:36Z</dc:date>
    </item>
    <item>
      <title>Re: XML Parsing using SPath</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Parsing-using-SPath/m-p/242900#M15084</link>
      <description>&lt;P&gt;Have you tried&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;.. | spath output=test path="Event.EventData.Data{@TargetDomainName}"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 23 Aug 2016 15:45:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Parsing-using-SPath/m-p/242900#M15084</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-08-23T15:45:50Z</dc:date>
    </item>
    <item>
      <title>Re: XML Parsing using SPath</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Parsing-using-SPath/m-p/242901#M15085</link>
      <description>&lt;P&gt;I don't think so the spath command supports attribute name based field reference. &lt;/P&gt;

&lt;P&gt;Give this workaround a shot&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search | rex mode=sed "s/(\&amp;lt;Data Name=\")([^\"]+)(\"\&amp;gt;)([^\&amp;lt;]+)(\&amp;lt;\/Data\&amp;gt;)/&amp;lt;\2&amp;gt;\4&amp;lt;\2&amp;gt;/g"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;See this runanywhere sample&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| gentimes start=-1 | eval _raw="&amp;lt;Event&amp;gt;&amp;lt;EventData&amp;gt;&amp;lt;Data Name=\"name1\"&amp;gt;value1&amp;lt;/Data&amp;gt;&amp;lt;Data Name=\"name2\"&amp;gt;value2&amp;lt;/Data&amp;gt;&amp;lt;/EventData&amp;gt;&amp;lt;/Event&amp;gt;" | table _raw | eval temp=_raw| rex mode=sed "s/(\&amp;lt;Data Name=\")([^\"]+)(\"\&amp;gt;)([^\&amp;lt;]+)(\&amp;lt;\/Data\&amp;gt;)/&amp;lt;\2&amp;gt;\4&amp;lt;\2&amp;gt;/g" | spath input=_raw
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 23 Aug 2016 15:53:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Parsing-using-SPath/m-p/242901#M15085</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-08-23T15:53:57Z</dc:date>
    </item>
    <item>
      <title>Re: XML Parsing using SPath</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Parsing-using-SPath/m-p/242902#M15086</link>
      <description>&lt;P&gt;Not sure if this helps or confuses:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults count=1 
| eval _raw="&amp;lt;Event xmlns=\"http://schemas.microsoft.com/win/2004/08/events/event\"&amp;gt;
&amp;lt;EventData&amp;gt;
&amp;lt;Data Name=\"MemberName\"&amp;gt;member&amp;lt;/Data&amp;gt;
&amp;lt;Data Name=\"MemberSid\"&amp;gt;ABC&amp;lt;/Data&amp;gt;
&amp;lt;Data Name=\"TargetDomainName\"&amp;gt;domain&amp;lt;/Data&amp;gt;
&amp;lt;Data Name=\"MemberName2\"&amp;gt;member&amp;lt;/Data&amp;gt;
&amp;lt;/EventData&amp;gt;
&amp;lt;/Event&amp;gt;" 
|  spath output=name path=Event.EventData.Data{@Name} 
| mvexpand name 
| table _raw name
| appendcols
  [
| makeresults count=1 
| eval _raw="&amp;lt;Event xmlns=\"http://schemas.microsoft.com/win/2004/08/events/event\"&amp;gt;
&amp;lt;EventData&amp;gt;
&amp;lt;Data Name=\"MemberName\"&amp;gt;member&amp;lt;/Data&amp;gt;
&amp;lt;Data Name=\"MemberSid\"&amp;gt;ABC&amp;lt;/Data&amp;gt;
&amp;lt;Data Name=\"TargetDomainName\"&amp;gt;domain&amp;lt;/Data&amp;gt;
&amp;lt;Data Name=\"MemberName2\"&amp;gt;member&amp;lt;/Data&amp;gt;
&amp;lt;/EventData&amp;gt;
&amp;lt;/Event&amp;gt;" 
| spath output=data path=Event.EventData.Data 
| mvexpand data 
| table _raw data
 ]
| search name=MemberSid OR name=TargetDomainName
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 23 Aug 2016 17:38:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Parsing-using-SPath/m-p/242902#M15086</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2016-08-23T17:38:08Z</dc:date>
    </item>
    <item>
      <title>Re: XML Parsing using SPath</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Parsing-using-SPath/m-p/242903#M15087</link>
      <description>&lt;P&gt;in my case I tried above with Index=myindex | rex mode=sed "s/()([^&amp;lt;]+)(&amp;lt;\/Data&amp;gt;)/&amp;lt;\2&amp;gt;\4&amp;lt;\2&amp;gt;/g"&lt;BR /&gt;
This does not gave me any result. &lt;/P&gt;

&lt;P&gt;Basically I want to extract value1 and value2 as per your example above as separate fields.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2016 11:53:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Parsing-using-SPath/m-p/242903#M15087</guid>
      <dc:creator>shan_santosh</dc:creator>
      <dc:date>2016-08-24T11:53:21Z</dc:date>
    </item>
    <item>
      <title>Re: XML Parsing using SPath</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Parsing-using-SPath/m-p/242904#M15088</link>
      <description>&lt;P&gt;Its not working, giving blank values&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2016 11:56:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Parsing-using-SPath/m-p/242904#M15088</guid>
      <dc:creator>shan_santosh</dc:creator>
      <dc:date>2016-08-24T11:56:14Z</dc:date>
    </item>
    <item>
      <title>Re: XML Parsing using SPath</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Parsing-using-SPath/m-p/242905#M15089</link>
      <description>&lt;P&gt;How can I specify my index here as it says makersult has to be the first command.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2016 12:33:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Parsing-using-SPath/m-p/242905#M15089</guid>
      <dc:creator>shan_santosh</dc:creator>
      <dc:date>2016-08-24T12:33:20Z</dc:date>
    </item>
    <item>
      <title>Re: XML Parsing using SPath</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Parsing-using-SPath/m-p/242906#M15090</link>
      <description>&lt;P&gt;Replace my "| makeresults count=1" with your main search string.&lt;/P&gt;

&lt;P&gt;Note I used makeresults twice.  Both should be replaced with your main search string.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2016 14:45:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Parsing-using-SPath/m-p/242906#M15090</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2016-08-24T14:45:44Z</dc:date>
    </item>
    <item>
      <title>Re: XML Parsing using SPath</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Parsing-using-SPath/m-p/242907#M15091</link>
      <description>&lt;P&gt;The when you replace | makeresults on the appendcols command be sure to add the word "search" directly after the left square brackets "[" followed by your main search..&lt;/P&gt;

&lt;P&gt;Ex. &lt;BR /&gt;
...|appendcols [ search index=main ...&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2016 14:47:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Parsing-using-SPath/m-p/242907#M15091</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2016-08-24T14:47:53Z</dc:date>
    </item>
    <item>
      <title>Re: XML Parsing using SPath</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Parsing-using-SPath/m-p/242908#M15092</link>
      <description>&lt;P&gt;I tried below&lt;BR /&gt;
index=myindex&lt;BR /&gt;
 | spath output=name path=Event.EventData.Data{@Name} &lt;BR /&gt;
 | mvexpand name &lt;BR /&gt;
 | table name | appendcols&lt;BR /&gt;
 [ | search index=myindex&lt;BR /&gt;
 | spath output=data path=Event.EventData.Data &lt;BR /&gt;
 | mvexpand data &lt;BR /&gt;
 | table data ]&lt;BR /&gt;
 | search name=MemberSid OR name=TargetDomainName&lt;/P&gt;

&lt;P&gt;but getting only name nothing for field data&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2016 07:00:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Parsing-using-SPath/m-p/242908#M15092</guid>
      <dc:creator>shan_santosh</dc:creator>
      <dc:date>2016-08-25T07:00:19Z</dc:date>
    </item>
    <item>
      <title>Re: XML Parsing using SPath</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Parsing-using-SPath/m-p/242909#M15093</link>
      <description>&lt;P&gt;I hate to ask the question, but why wouldn't you just use the Splunk TA Windows app to capture Windows EventLogs? It has built-in transforms and props.conf files to parse and extract WinEventLogs as well as perfmon and other nice things. &lt;/P&gt;

&lt;P&gt;&lt;A href="https://splunkbase.splunk.com/app/742/"&gt;https://splunkbase.splunk.com/app/742/&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;This is our modfied inputs.conf with some customized perfmon and security log filtering. If you do end up using this feel free to reach out, I can send you some searches. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[default]
evt_dc_name =
evt_dns_name =


###### OS Logs ######
[WinEventLog://Application]
disabled = 0
start_from = oldest
current_only = 0
checkpointInterval = 5
index = wineventlog
renderXml=false

[WinEventLog://Security]
disabled = 0
start_from = oldest
current_only = 0
evt_resolve_ad_obj = 1
checkpointInterval = 5
blacklist1 = EventCode="4662" Message="Object Type:\s+(?!groupPolicyContainer)"
blacklist2 = EventCode="566" Message="Object Type:\s+(?!groupPolicyContainer)"
blacklist3 = EventCode="5156" Message="(s|S)plunkd.exe"
blacklist4 = EventCode="4656" Message="(d|D)esktop.ini"
blacklist5 = EventCode="4656" Message="PlugPlaySecurityObject"
index = wineventlog
renderXml=false

[WinEventLog://System]
disabled = 0
start_from = oldest
current_only = 0
checkpointInterval = 5
index = wineventlog
renderXml=false


###### Windows Update Log ######
[monitor://$WINDIR\WindowsUpdate.log]
disabled = 0
sourcetype = WindowsUpdateLog
index = windows

###### Scripted Input (See also wmi.conf)
[script://.\bin\win_listening_ports.bat]
disabled = 1
## Run once per hour
interval = 3600
sourcetype = Script:ListeningPorts
index = windows

[script://.\bin\win_installed_apps.bat]
disabled = 0
## Run once per day
interval = 86400
sourcetype = Script:InstalledApps
index = windows

[perfmon://CPU Load]
index = perfmon
counters = % Processor Time;% User Time
instances = _Total
interval = 60
object = Processor

[perfmon://Available Memory]
index = perfmon
counters = Available Bytes
interval = 60
object = Memory

[perfmon://Free Disk Space]
index = perfmon
counters = Free Megabytes;% Free Space
instances = C:;D:;E:;F:
# 15 minutes
interval = 900
object = LogicalDisk

[perfmon://Network Interface]
index = perfmon
counters = Bytes Received/sec;Bytes Sent/sec
instances = *
interval = 60
object = Network Interface

[perfmon://LocalPhysicalDisk]
index = perfmon
# 5 minutes
interval = 300
object = PhysicalDisk
counters = Disk Bytes/sec; % Disk Read Time; % Disk Write Time; % Disk Time ;Avg. Disk Bytes/Read; Avg. Disk Bytes/Transfer; Avg. Disk Bytes/Write; Avg. Disk Queue Length; Avg. Disk Read Queue Length; Avg. Disk Write Queue Length; Avg. Disk sec/Read; Avg. Disk sec/Transfer; Avg. Disk sec/Write
instances = *
disabled = 0


[admon://default]
disabled = 1
monitorSubtree = 1

[WinRegMon://default]
disabled = 1
interval = 360
hive = .*
proc = .*
type = rename|set|delete|create
index = perfmon

[WinRegMon://hkcu_run]
disabled = 1
interval = 360
hive = \\REGISTRY\\USER\\.*\\Software\\Microsoft\\Windows\\CurrentVersion\\Run\\.*
proc = .*
type = set|create|delete|rename
index = perfmon

[WinRegMon://hklm_run]
disabled = 1
interval = 360
hive = \\REGISTRY\\MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\\.*
proc = .*
type = set|create|delete|rename
index = perfmon
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 25 Aug 2016 14:25:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Parsing-using-SPath/m-p/242909#M15093</guid>
      <dc:creator>JDukeSplunk</dc:creator>
      <dc:date>2016-08-25T14:25:01Z</dc:date>
    </item>
    <item>
      <title>Re: XML Parsing using SPath</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Parsing-using-SPath/m-p/242910#M15094</link>
      <description>&lt;P&gt;Thanks for your comments on this and showing readiness to help by proving search string etc.&lt;/P&gt;

&lt;P&gt;However, I am already using Splunk TA Windows application to get windows security events data using below stanza in inputs.conf file&lt;/P&gt;

&lt;H1&gt;Monitors Windows Security Events&lt;/H1&gt;

&lt;P&gt;[WinEventLog://Security]&lt;BR /&gt;
current_only = 1&lt;BR /&gt;
renderXml = 1&lt;BR /&gt;
suppress_text = 0&lt;BR /&gt;
checkpointInterval = 30&lt;BR /&gt;
evt_resolve_ad_obj = 1&lt;BR /&gt;
evt_dc_name = ap.com, na.com, eu.com, &lt;BR /&gt;
whitelist = 4732,4733&lt;BR /&gt;
index = myIndex&lt;BR /&gt;
disabled = 0&lt;/P&gt;

&lt;P&gt;But the problem is on one of my Splunk server 6.2 version, when I search index=myIndex it automatically extracts all the fields including XML attribute names etc. Where as on another Splunk server version 6.4.3 it does not extracts all fields automatically.&lt;/P&gt;

&lt;P&gt;I have also set KV_Mode = XML on my Splunk Indexer but still its not working. May be some thing is missing so Splunk 6.4.3 is not automatically extracting XML fields while search or during indexing.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 10:45:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Parsing-using-SPath/m-p/242910#M15094</guid>
      <dc:creator>shan_santosh</dc:creator>
      <dc:date>2020-09-29T10:45:42Z</dc:date>
    </item>
    <item>
      <title>Re: XML Parsing using SPath</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Parsing-using-SPath/m-p/242911#M15095</link>
      <description>&lt;P&gt;hmm it worked with your data on my splunk...&lt;/P&gt;

&lt;P&gt;Not sure if it matters but you had an extra pipe in the appendcols.  See if this works:&lt;/P&gt;

&lt;P&gt;index=myindex&lt;BR /&gt;
| spath output=name path=Event.EventData.Data{@Name} &lt;BR /&gt;
| mvexpand name &lt;BR /&gt;
| table name | appendcols&lt;BR /&gt;
[ search index=myindex&lt;BR /&gt;
| spath output=data path=Event.EventData.Data &lt;BR /&gt;
| mvexpand data &lt;BR /&gt;
| table data ]&lt;BR /&gt;
| search name=MemberSid OR name=TargetDomainName&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2016 19:29:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Parsing-using-SPath/m-p/242911#M15095</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2016-08-26T19:29:54Z</dc:date>
    </item>
    <item>
      <title>Re: XML Parsing using SPath</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Parsing-using-SPath/m-p/242912#M15096</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;I have also set KV_Mode = XML on my Splunk Indexer but still its not working.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;Two problems with this statement... First, attribute names in .conf files are case sensitive, attribute values sometimes can be case sensitive. Therefore this props.conf setting should be &lt;CODE&gt;KV_MODE = xml&lt;/CODE&gt; not &lt;CODE&gt;KV_Mode = XML&lt;/CODE&gt; per the &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.4.3/Admin/Propsconf"&gt;props.conf spec&lt;/A&gt;. Secondly, &lt;CODE&gt;KV_MODE&lt;/CODE&gt; is a search time attribute, therefore it should to be set for your sourcetype on your search head, ideally in the app where you're performing your search if not globally.&lt;/P&gt;</description>
      <pubDate>Sun, 28 Aug 2016 17:57:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Parsing-using-SPath/m-p/242912#M15096</guid>
      <dc:creator>acharlieh</dc:creator>
      <dc:date>2016-08-28T17:57:54Z</dc:date>
    </item>
    <item>
      <title>Re: XML Parsing using SPath</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Parsing-using-SPath/m-p/242913#M15097</link>
      <description>&lt;P&gt;Does it have to be &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.4.3/SearchReference/spath"&gt;spath&lt;/A&gt;? If you're open to using &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.4.3/SearchReference/xpath"&gt;xpath&lt;/A&gt; instead you could do something like this: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| xpath outfield=MemberSid "//*[local-name()='Data' and namespace-uri()='http://schemas.microsoft.com/win/2004/08/events/event' and @Name='MemberSid']"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It is indeed a bit more complex of a query, thanks to unprefixed XML namespaces, and the corresponding xpath behaviour as pointed out in &lt;A href="http://stackoverflow.com/a/6397369/504685"&gt;this stack overflow answer&lt;/A&gt;, but you can get the value of any data element with a specific Name attribute this way.&lt;/P&gt;

&lt;P&gt;Dummy Test: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | makeresults | eval _raw="&amp;lt;Event xmlns=\"http://schemas.microsoft.com/win/2004/08/events/event\"&amp;gt;
 &amp;lt;EventData&amp;gt;
 &amp;lt;Data Name=\"MemberName\"&amp;gt;member&amp;lt;/Data&amp;gt;
 &amp;lt;Data Name=\"MemberSid\"&amp;gt;ABC&amp;lt;/Data&amp;gt;
 &amp;lt;Data Name=\"TargetDomainName\"&amp;gt;domain&amp;lt;/Data&amp;gt;
 &amp;lt;Data Name=\"MemberName2\"&amp;gt;member&amp;lt;/Data&amp;gt;
 &amp;lt;/EventData&amp;gt;
 &amp;lt;/Event&amp;gt;" | xpath outfield=MemberSid "//*[local-name()='Data' and namespace-uri()='http://schemas.microsoft.com/win/2004/08/events/event' and @Name='MemberSid']"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 28 Aug 2016 18:25:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/XML-Parsing-using-SPath/m-p/242913#M15097</guid>
      <dc:creator>acharlieh</dc:creator>
      <dc:date>2016-08-28T18:25:36Z</dc:date>
    </item>
  </channel>
</rss>

