XML::Code 0.04 review

Download
by rbytes.net on

XML::Diff is a Perl module for XML DOM-Tree based Diff & Patch Module. SYNOPSIS my $diff = XML::Diff->new(); # to genera

License: Perl Artistic License
File size: 17K
Developer: Arne Claassen
0 stars award from rbytes.net

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 0.04 keywords