I am working with a site where a XML payload is shown for user to manipulate. The problem is that some XML payloads have an embedded payload in them in form of escaped HTML string, below is an example:
<envelope>
<body>
<result>
<?xml version="1.0" encoding="utf-8"?>
<Testimonial>
<directional>
<allowed />
</directional>
</Testimonial>
</result>
</body>
</envelope>
note that there is an xml embedded inside a soap envelope as an escaped string. I need to preserve the exact form of the string above which means i need to preserve the characters which were originally escaped. Essentially what i'm looking for is how stackoverflow textarea handles the above string and how it maintains the escaped characters
. Can anyone suggest how this could be done?