Does XML::LibXML::Node replaceNode() replace Perl instances of the replaced node -


... after replace a b, previous references a point b?

#!/usr/bin/perl use warnings; use strict;  use xml::libxml;  $dom = 'xml::libxml'->load_xml(string => '<r><p><c/></p></r>'); ($n1) = $dom->findnodes('/r/p/c'); ($n2) = $dom->findnodes('/r/p/c'); $n1->replacenode('xml::libxml::element'->new('n')); print $dom; print $n1, $n2; 

output:

<?xml version="1.0"?> <r><p><n/></p></r> <c/><c/> 

Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -