Hello. I'm pretty new to perl. I have an xml file that has several different xml messages. What is common about each of the xml messages is that they each have a child node with the same name (EventInfo). The following is an example of the payloads:

Don't try to parse XML yourself. You should probably use parsers. There two kinds of parsers for XML: DOM and SAX. DOM loads the entire file in memory, so that SAX is probably better if your files are huge and may lead to memory overflow.

I would like to make the parent node a wildcard and always search on the child node of EventInfo, but would like my result to be the entire xml payload. I tried the following, but this is not behaving correctly either.