The difference between your observed and expected output appears to be down to canonicalisation. See eg:
#!/usr/bin/env perl use strict; use warnings; use XML::LibXML; my $dom = XML::LibXML->load_xml (string => <<'EOT'); <?xml version="1.0"?> <header> <id x_id="1"> <a/> <b/> <c>as</c> </id> </header> EOT print "\nNot canonical:\n\n" . $dom->toString; print "\nWith canonical:\n\n" . $dom->toStringC14N;
In reply to Re^4: XML replacenode
by hippo
in thread XML replacenode
by michael99
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |