Dashboards & Visualizations
Highlighted

XPath Two Levels of Attributes

Path Finder

With this XML:

<serverVariables>
<item name="GATEWAY_INTERFACE">
   <value string="CGI/1.1" />
 </item>
 <item name="HTTPS">
   <value string="off" />
 </item>

How can I use the XPATH command to get key value pairs like:

GATEWAY_INTERFACE:CGI/1.1
HTTPS:off
Tags (2)
0 Karma
Highlighted

Re: XPath Two Levels of Attributes

Path Finder

Figured it out for at least a specific field:

xpath "//item/[@name='HTTPS']/value/@string" outfield=LOATH_XML

View solution in original post

Speak Up for Splunk Careers!

We want to better understand the impact Splunk experience and expertise has has on individuals' careers, and help highlight the growing demand for Splunk skills.