On Thu, Jun 25, 2009 at 9:36 AM, saturon<netbeans_at_vtxfree.ch> wrote:
> Hi there,
>
> I now come to a problem i already had 1.5 years back and then solved with a
> workaround. Now after 1.5 years I wonder if there are any better solutions.
>
> My stack:
> Jersey 1.01/Glassfish 2.1
>
> To develop: NB 6.1 with jersey plugin
>
> REST services serve xml, which partly contains xml-illegal characters.
> Therefore I need to produce xml elemements with cdata tags.
Ben: I am not sure I understand your solution. Any characters that are
illegal in XML (even if escaped) are illegal in CDATA as well as
anywhere else. And all the other characters ('<', '&' etc) will be
properly escaped by XML writer, and handled by matching reader.
So most often CDATA is not a solution to a problem, except if the
problem is how to conveniently cut'n paste non-xml text content in an
existing xml document using a text editor (for which it works ok)
Semantically escaped character data is no different from stuff in CDATA.
But usually there is something more in there that explains the approach. :-)
So what am I missing here?
-+ Tatu +-