NAME XML::LibXML::Overlay - Overlays for XML files SYNOPSIS # target.xml: #### # # # Larry Wall # Tom Christiansen # Delete Me! # Programming Perl: There's More Than One Way To Do It # 9780596000271 # # # Elliotte Rusty Harold # W. Scott Means # XML in a Nutshell: A Desktop Quick Reference # 9780596007645 # # # overlay.xml #### # # # # # # # # Mark Jason Dominus # Higher-Order Perl. Transforming Programs with Programs # 9781558607019 # # # # use XML::LibXML; use XML::LibXML::Overlay; my $overlay = XML::LibXML::Overlay->load_xml( 'location' => '/path/to/overlay.xml', ); my $target = XML::LibXML->load_xml( 'location' => '/path/to/target.xml', ); $overlay->apply_to($target); # do whatever you want with $target DESCRIPTION XML::LibXML::Overlay allowes to apply overlay files to XML files. This modul is a rewirte of XML::Overlay, but it uses plain XML::LibXML instead of the Class::XML thru XML::Parser stack. DETAILS XML::LibXML::Overlay inherits from XML::LibXML. So you can use XML::LibXML::Overlay like XML::LibXML. The only difference is, that "load_xml" returns a XML::LibXML::Overlay::Document instead of a XML::LibXML::Document. Tags Following Tags can be used in a overlay document. overlay Specifies the root element, and contains any target element. target Selectes one or more nodes of the target document given by the xpath attribute. Target Elements contain any number of action elements. action The attributes type and attribute of action nodes specify a action which sould be applied to the target element. Action attributes Following attributes can be used to specify an action. appendChild Appends the content of the action element as child to the end of the target nodes. delete Deletes the target element. insertBefore Inserts the content of the action element as sibling before the target nodes. insertAfter Inserts the content of the action element as sibling after the target nodes. setAttribute Sets the value of the specified attribute to the content of the action node. removeAttribute Removes the specified attribute. METHODS load_xml Can be used as "load_xml" in XML::LibXML, but returns a XML::LibXML::Overlay::Document instead of a XML::LibXML::Document. SEE ALSO XML::LibXML, XML::Overlay AUTHOR Alexander Keusch, "" LICENSE This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.