Dashboards & Visualizations

XPath Two Levels of Attributes

Kyle_Brandt
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
1 Solution

Kyle_Brandt
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

Kyle_Brandt
Path Finder

Figured it out for at least a specific field:

xpath "//item/[@name='HTTPS']/value/@string" outfield=LOATH_XML
Get Updates on the Splunk Community!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...