Re: XML::LibXML search path for DTDs
Nick Wellnhofer <[email protected]> Thu, 13 Sep 2012 19:13:48 +0200
| Newsgroups | gmane.comp.lang.perl.xml |
|---|---|
| Message-ID | <[email protected]> |
On 13/09/2012 19:04, Roger Pepitone wrote: > Let me rephrase: I can work out where the DTDs will be. I'm having > trouble giving that path to LibXML. > - I can't put a path to the DTD into the XML file, because it will > differ for various users. > - I can't put in a line like $parser->parse_file ($xml_location, > dtd_search_path => [ $dtd_location ]); > into my Perl code because, AFAICT, there is no 'dtd_search_path' > option. Maybe XML catalogs work for you: https://metacpan.org/module/XML::LibXML::Parser#XML-CATALOGS Alternatively, you could try to write your own input callbacks that load the DTDs from the correct location: https://metacpan.org/module/XML::LibXML::InputCallback Nick _______________________________________________ Perl-XML mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs