XML::Code

XML::Diff is a Perl module for XML DOM-Tree based Diff & Patch Module.
Download

XML::Code Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Arne Claassen
  • Publisher web site:
  • http://search.cpan.org/~sdether/XML-Diff-0.04/Diff.pm

XML::Code Tags


XML::Code Description

XML::Diff is a Perl module for XML DOM-Tree based Diff & Patch Module. XML::Diff is a Perl module for XML DOM-Tree based Diff & Patch Module.SYNOPSIS my $diff = XML::Diff->new(); # to generate a diffgram of two XML files, use compare. # $old and $new can be filepaths, XML as a string, # XML::LibXML::Document or XML::LibXML::Element objects. # The diffgram is a XML::LibXML::Document by default. my $diffgram = $diff->compare( -old => $old_xml, -new => $new_xml, ); # To patch an XML document, an patch. $old and $diffgram # follow the same formatting rules as compare. # The resulting XML is a XML::LibXML::Document by default. my $patched = $diff->patch( -old => $old, -diffgram => $diffgram, );This module provides methods for generating and applying an XML diffgram of two related XML files. The basis of the algorithm is tree-wise comparison using the DOM model as provided by XML::LibXML.The Diffgram is well-formed XML in the XVCS namespance and supports update, insert, delete and move operations. It is meant to be human and machine readable. It uses XPath expressions for locating the nodes to operate on. Requirements: · Perl


XML::Code Related Software