Yea, cdata is a traditional way in XML. XMPP seems not prefer CDATA. I don’t 
know what's the detailed reason. But I think CDATA has its advantage sometimes.

Regards
.:|:.:|:. Field Tian | CCATG HF Software Engineer | +8655166111136


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf 
Of Matthew Wild
Sent: 2013年10月11日 9:08
To: XMPP Standards
Subject: Re: [Standards] Proposed XMPP Extension: JSON Containers

Hi,

On 11 October 2013 01:50, Field Tian (fitian) <[email protected]> wrote:
>    If wrap json directly, we need to do xml escape, It is boring. or 
> XML Parser cannot parse the follow message(I put <x> into the value of 
> status).

It might be boring, but any XML/XMPP library will be able to do this for you 
already. I really hope XMPP developers aren't manually XML escaping in their 
day-to-day work - I know I'm not :)

> Why not use the traditional way? For example, to extend an element 
> called <cdata>, then whatever type of message can be put into. Please comment!

It's definitely not "traditional" to use cdata in XMPP. I would worry about 
interoperability problems, and I don't think how you escape the data (through 
entities or cdata) is within the scope of this XEP anyway.

Regards,
Matthew

Reply via email to