Thanks Koen that fixed the problem even if I'm not so impressed by them putting the entire method on one line.
public void deleteNil(XPathNavigator node)
{
if (node.MoveToAttribute("nil", "http://www.w3.org/2001/XMLSchema-instance"))
{
node.DeleteSelf();
}
else { }
}