Deserialisation of OptionType class reads null values for name and value

To deserialise the name and value properties of the PayPal.PayPalAPIInterfaceService.Model.OptionType class, the code was calling SelectSingleNode, which looks for elements in the xml.

The xml sent by Pay Pal contains the name and value as attributes, so SelectSingleNode returns null.
I have changed it to call xmlNode.Attributes.GetNamedItem() to read the values.