I am using XML to share HTML content. AFAIK, I could embed the HTML either by:
Encoding it: I don't know if it is completely safe to use. And I would have to decode it again.
Use CDATA sections: I could still have problems if the content contains the closing tag "]]>" and certain hexadecimal characters, I believe. On the other hand, the XML parser would extract the info transparently for me.
Which option should I choose?
UPDATE: The xml will be created in java and passed as a string to a .net web service, were it will be parsed back. Therefore I need to be able to export the xml as a string and load it using "doc.LoadXml(xmlString);"