Fix for undefined @attributes, update the deprecated nodeValue