Re: Issues with Packaging Application Payloads

Laird A Popkin wrote:
> 1) Include the "body" as arbitrary data, terminated by ]]>. This has the
> problem that the body cannot contain the termination string because the
> termination does not nest in XML. Thus, if I try to send a message that
> contains ]]> I terminate the processing of the body early and treat the
> remainder of the body as if it were part of the wrapper

Here we go again...

As I and others have pointed out several times on this list,
all you need to do is to *escape* the delimiter.  Here's one
way to do it:

    <![CDATA[data]]]><![CDATA[]>data]]>

(the first section contains "data]", the second "]>data")

Here's another:

    <![CDATA[data]]>]]&gt;<![CDATA[data]]>

etc.

Writing CDATA sections is no different from putting any other
data in an XML file: if you don't check what you write, you'll
end up producing broken XML files sooner or later.

(And if you do check what you write, it's not that hard to escape
whatever needs to be escaped: <, &, and ]]> in text, ]]> inside
CDATA sections, etc).

</F>

Received on Wednesday, 18 October 2000 10:10:43 UTC