$xp = XML::XPath->new(filename => 'config.xml'); $xp->setNodeText(qq~/conf/section[\@name="$name"]/description[\@lang="$lang"]~, $val);