my ($node) = $doc->findnodes('//remote[@name="korg"]'); $node->setAttribute(name => 'other');