Reference event log data by position using XPATH

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hello - I am working with some scripts triggered from system events. The scripts need access to some of the event data. In may events the data elements are named and I can select them with an XPATH like this:<br/>
<br/>
<Value name="TargetUserName Event/EventData/Data[@Name="TargetUserName"]</Value><br/>
However I have other events where the data section has no name.<br/>

<br/>

<EventData><br/>
<Data>192.168.4.70</Data><br/>
<Data>DCarivai</Data><br/>
<Data>2</Data><br/>
</EventData><br/>
</Event><br/>
<br/>
<br/>
How would I refer to the IP address in the above XML data? I have tried the following but it does not work.<br/>
<br/>
<Value name="TargetUserName Event/EventData/Data[1]</Value><br/>
Thanks in advance!

View the full article
 
Back
Top