You could always do a string replace on the final xml output.
Replace(" i:nil=\"true\"/>","/>");
Generally, it is a bad idea to try to hack at xml with string manipulation, but the replace above is safe and will always convert to .
It's a hack, but an acceptable one considering the alternative.