I'm using XMLSerializer() to output an in-memory XML document, however it seems to 'entitizing' elements using XHTML standard entities like   ; . I want to produce an XML document without XHTML entites.
My target DTD does not define these entities, so if a user happens to input a character w/ a corresponding XHTML entity, the serialized document is not well-formed (references an undefined entity like &nsbp;)
Maybe I'm building the DOM tree incorrectly? Or is there another way to avoid XMLSerializer() behaving as if it were XHTMLSerializer()?