[XML4LIB] RE: using xml::libxml to find & replace in xml docu ments

Binkley, Peter Peter.Binkley at ualberta.ca
Wed Aug 4 11:28:49 EDT 2004


And for managing the xsl processing of 700 files, you can't beat Apache Ant.


Peter


> -----Original Message-----
> From: Wick, Ryan [mailto:Ryan.Wick at oregonstate.edu] 
> Sent: Friday, July 09, 2004 09:22 AM
> To: Multiple recipients of list
> Subject: [XML4LIB] RE: using xml::libxml to find & replace in 
> xml documents
> 
> 
> I haven't worked with XML::LibXML before, but for a similar 
> situation I created an XSL stylesheet that acts as a find and 
> replace mechanism. Just perform the transformation, and you 
> get all of the original file as XML except where you elected 
> to make changes. It handles processing instructions, attributes, etc.
> 
> Let me know if you're interested in the XSL file.
> 
> Ryan Wick
> Information Technology Consultant
> Special Collections - OSU Libraries
> Oregon State University
> 541-737-2075
> ryan.wick at oregonstate.edu 
> http://osulibrary.oregonstate.edu/specialcolle> ctions
> 
> 
> 
> -----Original Message-----
> From: 
> xml4lib at sunsite3.berkeley.edu 
> [mailto:xml4lib at sunsite3.berkeley.edu]On > Behalf Of Eric Lease 
> Morgan
> Sent: Thursday, July 08, 2004 9:22 PM
> To: Multiple recipients of list
> Subject: [XML4LIB] using xml::libxml to find & replace in xml 
> documents
> 
> 
> 
> 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