http://www.perlmonks.org?node_id=893879


in reply to parsing XML fragments (xml log files) with XML::Parser

Could just use XML::Simple and add a root node as needed
use XML::Simple; use Data::Dumper; use strict; my $data = do {local $/; <DATA>}; my $ref = XMLin("<root>$data</root>"); print Dumper($ref); __DATA__ <logentry>...more xml 1...</logentry> <logentry>...more xml 2...</logentry> <logentry>...more xml 3...</logentry>
Then again, that's not an event-based parser. Will consider other possible solutions...