Splunk Search

How to extract data from XML tags

mhirt34
Observer

Looking for help extracting Info between XML tags. This is generated from windows Print server event logs. the raw data looks like this:

 

<Event xmlns='http://schemas.microsoft.com/win/2004/08/events/event'><System><Provider Name='Microsoft-Windows-PrintService' Guid='{747EF6FD-E535-4D16-B510-42C90F6873A1}'/><EventID>307</EventID><Version>0</Version><Level>4</Level><Task>26</Task><Opcode>11</Opcode><Keywords>0x4000000000000840</Keywords><TimeCreated SystemTime='2022-12-19T20:07:42.882389000Z'/><EventRecordID>Record_ID</EventRecordID><Correlation/><Execution ProcessID='procID' ThreadID='threadID'/><Channel>Microsoft-Windows-PrintService/Operational</Channel><Computer>User's computer</Computer><Security UserID='SID'/></System><UserData><DocumentPrinted xmlns='http://manifests.microsoft.com/win/2005/08/windows/printing/spooler/core/events'><Param1>216</Param1><Param2>Print Document</Param2><Param3>Username</Param3><Param4>Users_computer</Param4><Param5>Print Share Name</Param5><Param6>printer_name</Param6><Param7>1406204</Param7><Param8>1</Param8></DocumentPrinted></UserData></Event>

 


How do extract Peram3 and Peram5? 
I have attempted using this regular expression, but it fails to find it

 

 | regex _raw ="<Param3>.*?<\/Param3>"

 

Labels (4)
0 Karma

PickleRick
SplunkTrust
SplunkTrust

You can try:

  • spath
  • xpath
  • xmlkv
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

.conf25 Global Broadcast: Don’t Miss a Moment

Hello Splunkers, .conf25 is only a click away.  Not able to make it to .conf25 in person? No worries, you can ...

Observe and Secure All Apps with Splunk

 Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

What's New in Splunk Observability - August 2025

What's New We are excited to announce the latest enhancements to Splunk Observability Cloud as well as what is ...