In this case I think that an XML::Parser call wrapped in an eval is your best bet. Something like this:
foreach (@list_of_20_000_files) { my $p = XML::Parser->new; eval { $p->parsefile($_) }; if ($@) { print "$_ is bad\n"; } else { print "$_ is good\n"; } }
The one thing that worries me tho' is that you talk about 'snippets' of well-formed XML. If those snippets don't have one enclosing element, then they won't be well-formed.
--
"Perl makes the fun jobs fun
and the boring jobs bearable" - me
In reply to Re: well formed xml
by davorg
in thread well formed xml
by marvell
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |