That's pretty much how I'd do it. Using code like this:
--use XML::Parser; my $p = XML::Parser->new; my $file = 'whatever.xml'; eval { $p->parsefile($file) }; if ($@) { # XML is not well formed } else { # XML is well formed }
"The first rule of Perl club is you don't talk about Perl club."
In reply to Re: Is a file XML?
by davorg
in thread Is a file XML?
by ajt
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |