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

sql - can we replace full join with union of left and right join? why not? -

javascript - Parallax scrolling and fixed footer code causing width issues -

iOS: Performance of reloading UIImage(name:...) -