Change attr.nodeValue to attr.value (deprecation warning)