in reply to Trouble using XML::LibXML

Other's have identified the core problem but ... you might also benefit by moving the instantiation of your parser outside of the loop:

my $parser = XML::LibXML->new(); while (my @row = $sth->fetchrow_array()){ my $doc = $parser->parse($row[0]); ... }

-derby