in reply to well formed xml

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.

--
<http://www.dave.org.uk>

"Perl makes the fun jobs fun
and the boring jobs bearable" - me

Replies are listed 'Best First'.
Re: Re: well formed xml
by marvell (Pilgrim) on Feb 28, 2001 at 20:44 UTC
    I will be wapping the string in a dummy tag.

    --
    Brother Marvell