- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
jip31
Motivator
11-26-2018
02:08 AM
Hello
I have XML logs and I want to extract all the text between these tags
What is the better way to do this please???
"<Data><EventData></Data></EventData>"
1 Solution
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

FrankVl
Ultra Champion
11-26-2018
04:47 AM
Assuming this is related to you other question, the EventData_Xml field is already extracted and looks like <Data>...text...</Data>
, right?
So you want to get the part from between the Data tags?
| rex field=EventData_Xml "\<Data\>(?<EventData_Data>[^\<]+)\<\/Data\>"
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

FrankVl
Ultra Champion
11-26-2018
04:47 AM
Assuming this is related to you other question, the EventData_Xml field is already extracted and looks like <Data>...text...</Data>
, right?
So you want to get the part from between the Data tags?
| rex field=EventData_Xml "\<Data\>(?<EventData_Data>[^\<]+)\<\/Data\>"
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
jip31
Motivator
11-26-2018
10:01 PM
many thanks
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

FrankVl
Ultra Champion
11-26-2018
02:21 AM
That doesn't look like valid XML, are you sure the tags occur in that order? I would expect the </Data>
to come behind the </EventData>
.
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
jip31
Motivator
11-26-2018
02:39 AM
yes you are right sorry
