Thanks for posting the fix on here. I wonder if you wouldn't mind elaborating however on why this works. I've been trying the obvious:
node.SetValue(string.Empty);
node.CreateAttribute("xsi", "nil", "http://www.w3.org/2001/XMLSchema-instance", "true");
and getting the schema validation error ...