Figured out how to update most of the XML elements. I'm having issues with two. I want to updated the Attribute and another value as shown below. I want to update everything that has 123 with ABC. The structure is more complicated. I narrowed it down as that is all that is left that I need to update.
<?xml version="1.0" encoding="utf-8"?>
XDocument xdoc = XDocument.Load(xml);
var result = (from x in xdoc.Descendants("key")
where x.Parent.Name.LocalName == "person"
where x.Attribute("ID").Value == sKey
if result != null
result.Element("key").Attribute("ID").SetValue(sKey); //This gives me object not set error.