Seems like the possible null reference exception checks are a little too aggressive in 4.0. This code snippet gives a warning on the third line, for possible null reference exception on "doc.DocumentElement".
var doc = new XmlDocument();
This code can not produce a null reference exception as warned. While DocumentElement can technically raise a null reference exception, mostly it's referenced after one has loaded a document.
If the null reference exception warning can't be taken off from this property by default, then it'd be very nice if there was a way to turn off this warning for this property only. Not by pragma (nice, but too ugly), but a more specific option, so instead of
"Change severity of warning 'Possible System.NullReferenceException'."
it'd be better to have the option
"Change severity of warning 'Possible System.NullReferenceException' for 'System.Xml.XmlDocument::DocumentElement;."