#!/usr/bin/env perl use strict; use warnings; use XML::LibXML; my $dom = XML::LibXML->load_xml (string => <<'EOT');
as
EOT print "\nNot canonical:\n\n" . $dom->toString; print "\nWith canonical:\n\n" . $dom->toStringC14N;