I have XML tag that has the content which is HTML document.
<xml-tag>
<!--
<p>html document goes here</p>
<p><span id="important">important html</span></p>
-->
</xml-tag>
Now, Is there anyway to escape the whole html document inside the body of <xml-tag>? If I don’t escape the content, the XML document will not be well-formed and I will have no way to retrieve the data I need. In C#, for example, If I want to escape the whole string, I can put the @ symbol in front of the string, is there anyway to do that in XML?
You can wrap the whole HTML part in CDATA:
See more information on using CDATA here: http://www.w3schools.com/xml/xml_cdata.asp