in reply to XML::SAX::ExpatXS - stop parsing?
How about
die "DONE\n"; ... if (!eval { $parser->parse_string($tree); 1 # No exception }) { die $@ if $@ ne "DONE\n"; }
In Section
Seekers of Perl Wisdom