Hi,
I've been wrestling with this for awhile and am surprised there isn't more on the internet about how to do this. I'm trying to post XHTML (using a wysiwyg editor called Tinymce) and then append that XHTML to an XML document tree. The main problem I keep coming up against is the use of certain chars in the posted data. When I post <p>hello world</p> it is correctly appended to the document. If I post <p>Tim & Mary</p> the append fails because of the invalid character "&" and its the same with < and >. There must be something in .NET that can write this data to XML so that the XML is well formed. I can write the XML using the WriteRaw method but I cant then manipulate the XML Doc created because its invalid. Can anyone suggest a way to do this? Any thoughts welcome!
Thanks
Matt
I've been wrestling with this for awhile and am surprised there isn't more on the internet about how to do this. I'm trying to post XHTML (using a wysiwyg editor called Tinymce) and then append that XHTML to an XML document tree. The main problem I keep coming up against is the use of certain chars in the posted data. When I post <p>hello world</p> it is correctly appended to the document. If I post <p>Tim & Mary</p> the append fails because of the invalid character "&" and its the same with < and >. There must be something in .NET that can write this data to XML so that the XML is well formed. I can write the XML using the WriteRaw method but I cant then manipulate the XML Doc created because its invalid. Can anyone suggest a way to do this? Any thoughts welcome!
Thanks
Matt