Re: XML::LibXML hangs on document w/ DTD
Francisco Obispo <[email protected]> Tue, 15 Nov 2011 10:40:34 -0800
| Newsgroups | gmane.comp.lang.perl.xml |
|---|---|
| Message-ID | <[email protected]> |
It's trying to download the dtd from: > http://www.w3.org/TR/html4/loose.dtd $ netstat -na |grep 128.30.52.37 tcp4 0 0 172.30.42.35.52389 128.30.52.37.80 ESTABLISHED $ ./test.pl parsed a parsed b If you could download the loose.dtd file and use that to validate against, it should speed up things. Francisco On Nov 15, 2011, at 10:33 AM, Vaclav Barta wrote: > #!/usr/bin/perl > > use XML::LibXML; > > use strict; > use warnings; > > my $parser = XML::LibXML->new(); > $parser->keep_blanks(0); > > my $a = $parser->load_xml(string => <<'ADOC'); > <html> > </html> > ADOC > print "parsed a\n"; > my $b = $parser->load_xml(string => <<'BDOC'); > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" > "http://www.w3.org/TR/html4/loose.dtd"> > <html> > </html> > BDOC > print "parsed b\n"; Francisco Obispo email: [email protected] Phone: +1 650 423 1374 || INOC-DBA *3557* NOC Key fingerprint = 532F 84EB 06B4 3806 D5FA 09C6 463E 614E B38D B1BE _______________________________________________ Perl-XML mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs