I need to end up with 1" but I keep getting 1"
That's because you're trying to do the XML API's job for it.
Your job is to provide just text - its job is to handle escaping and anything else XML needs to do.
So you should just use
xml.WriteString("1\"");
... where the backslash is just for the sake of C#'s string literal handling, and has nothing to do with XML. The logical value you're trying to write out is a 1 followed by a double-quote. Whether it's escaped as "
or not should be irrelevant to anything processing it. If you've got something which is over-sensitive, you should fix that.
If you desperately need this (and I would again strongly urge you not to), try:
xml.WriteString("1");
xml.WriteEntityRef("quot");
(I'd also urge you to use LINQ to XML unless you're in a situation where you really need to use XmlWriter
. It'll make your life significantly simpler.)