using xml::libxml to find & replace in xml documents

Eric Lease Morgan emorgan at
Fri Jul 9 00:16:00 EDT 2004

Has anybody here written one or more Perl scripts using XML::LibXML to 
find & replace in XML documents?

I have a set of 700 XML files. Each one has an incorrect attribute 
value in a processing instruction, a few invalid attributes in a 
particular element, and a set of elements that are no longer valid 
against the DTD.

I want to use XML::LibXML to clean up these files, and I'm hope someone 
out there has already done this to some extent and can share their 
code. While the XML::LibXML modules are very functional, I wish they 
had more examples in their PODs.

Eric Lease Morgan
University Libraries of Notre Dame

More information about the xml4lib mailing list