I use XMLSerializer () to output an XML document in memory, however it seems to βgiveβ elements using standard XHTML objects such as & nbsp ;, I want to create an XML document without XHTML authority .
My target DTD does not define these entities, therefore, if the user enters the w / character of the corresponding XHTML object, the serialized document is not correct (refers to an undefined object such as & nsbp;)
Perhaps I am creating the DOM tree incorrectly? Or is there another way to avoid using XMLSerializer (), as if it were XHTMLSerializer ()?
source share