Ing. Branislav Gerzo [IBG], on Thursday, September 02, 2004 at 12:34
(+0200) wrote these comments:

IBG> I know how to validate XML, but still error massages appears on
IBG> STDOUT, anyone knows how to avoid them ?

I answer to my simple question, Brano, it is easy, just wite this:

use strict;
use XML::Parser;

my $p = XML::Parser->new;
my $file = 'data.xml';

eval { $p->parsefile($file) };

if ($@) {
  print 'XML is not well formed';
} else {
  print 'XML is well formed';
}


-- 

 ...m8s, cu l8r, Brano.

[I am Kojak of Borg: Who loves to assimilate ya, baby.]



-=x=-
Skontrolované antivírovým programom NOD32


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to