通过SimpleXML过滤

I have parsed an XML file and styled it to get the desired results. Now I am trying to filter only certain alerts based on the vairbles created from the SimpleXML nodes and that appears to be where I am stuck. In this case I am only trying to display Tornado Warning, Severe Thunderstorm Warning, Flash Flood Warning and Flood warning from the event node which is also the event variable create from it and its associated information. Now while I want to display those events matching that title I am also trying to order it by that as well.

What would be the best way to do this with what I have put together up to this point? Here is the full code with parsing a test XML with two entries for testing that should be not displayed at the end.

https://www.tehplayground.com/sta3Al7tIHlUVzhB

Now if I do this where before the style is outputted with the variables this works perfectly but I am unable to sort with it like this.

elseif ($event == 'Tornado Warning' || $event == 'Severe Thunderstorm Warning' || $event == 'Flash Flood Warning')