Re: XML::LibXML: How to tell parse_balanced_chunk what DTD to use?
Reuben Thomas <[email protected]> Thu, 16 Sep 2010 14:20:47 +0100
| Newsgroups | gmane.comp.lang.perl.xml |
|---|---|
| Message-ID | <[email protected]> |
On 13 September 2010 11:42, Robin Berjon <[email protected]> wrote: > On Sep 9, 2010, at 09:40 , Reuben Thomas wrote: >> I am reading balanced chunks with the following code: >> >> my $parser = XML::LibXML->new(); >> my $chunk = slurp($objpath); >> my $chunk_node; >> eval { $chunk_node = $parser->parse_balanced_chunk($chunk); }; >> >> It so happens that the XML I am trying to parse is XHTML. When it >> contains an XHTML entity reference, I naturally get an undefined >> entity error. >> >> How do I tell the parser object the DTD I am using? > > If there's a way of doing that, I'm not aware of it. So does that mean there's no way to use parse_balanced_chunk on XML that contains non-default entity references? That seems a bit odd... Thanks for the workaround. -- http://rrt.sc3d.org _______________________________________________ Perl-XML mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs