Changed depreciated code.

nodeName and nodeValue are depreciated. Replaced with .name and .value.