in reply to XML::LibXML complains

Greetings, Skeeve.

I should preface this by stating I haven't used XML::LibXML. That said. Where retrieving the DTD is concerned. As I read it, from the pod, and from your example code, it's (load_xml) attempting to load a File Handle. So I think that's what it's choking on.

In other words, it's looking for the file you want to parse/manipulate.

FWIW, it's also possible (where the DTD is concerned) to modify the location

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
could be written as
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://path/to/my/personal/local/DTD/my-strict-xhtml.dtd">

Best wishes.

--Chris

UPDATE: OOP's looks like the solution was found while I composed my response. :P

¡λɐp ʇɑəɹ⅁ ɐ əʌɐɥ puɐ ʻꜱdləɥ ꜱᴉɥʇ ədoH