in reply to How do I get LibXML to replace attribute values?
Get the element, and set its attribute:
my ($node) = $doc->findnodes('//remote[@name="korg"]'); $node->setAttribute(name => 'other');
Or get the attribute, and change its value:
my ($node) = $doc->findnodes('//remote/@name[.="korg"]'); $node->setValue('other');
Three key concepts:
|
|---|