Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: LibXML: Change a node into a comment

by choroba (Chancellor)
on Apr 04, 2013 at 07:58 UTC ( #1026946=note: print w/replies, xml ) Need Help??


in reply to LibXML: Change a node into a comment

Using XML::XSH2, a wrapper around XML::LibXML:
open 1.xml ; insert comment xsh:serialize(/start/a[1]) prepend /start ; delete /start/a[1] ;
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ