I've noticed that, if there is a comment within the Select or Suppress query text, all the text after the first comment gets ignored. This text contains the embedded xpath query and it breaks proper enumeration and guessing at which event IDs, etc will be guessed.
E.g. for:
<QueryList>
<Query Id="0" Path="Security">
<!-- E.g. extra custom query that gets more security events if MSSQLSERVER is installed -->
<Select Path="Application">
*[
System[
Provider[@Name='MSSQLSERVER'] and
(
EventID=18452 or
EventID=18453 or
<!-- embeded comment -->
EventID=18454 or
EventID=18456
)
]
]
</Select>
</Query>
</QueryList>
Only event IDs 18452 and 18453 before the comment get included.
I've tracked this issue to the way the text property in lxml from python is limited to only everything in the current child node, and so it's the first piece of text, not all text, within an element.
I've noticed that, if there is a comment within the Select or Suppress query text, all the text after the first comment gets ignored. This text contains the embedded xpath query and it breaks proper enumeration and guessing at which event IDs, etc will be guessed.
E.g. for:
Only event IDs 18452 and 18453 before the comment get included.
I've tracked this issue to the way the
text
property in lxml from python is limited to only everything in the current child node, and so it's the first piece of text, not all text, within an element.The problem is with all calls to
s.text
here: https://github.com/JPvRiel/wef-reference/blob/aa8a4984eb6de25ad505653d64137a1a4a3c1e19/compare_wef.py#L254