How can I insert raw/arbitrary XML data into a PacketExtension field?

I have a PacketExtension that includes some fields, one of which is a string that contains some arbitrary XML. This field is causing problems for the parser - it detects the tags in the arbitrary xml and thinks they’re part of the extension. I want the parser to ignore and not try to parse my arbitrary XML data - is this possible? How should I go about it?

thanks

Escape the XML content before it is added in the extension. Unescape it after it is retrieved.