powered by Jive Software

CDATA xml parser problem in the CM

while i send the message like this:

<message id=’‘message27’’ to=’‘13750875510@smsabc.com’’ type=’‘normal’’ > <subject> </subject><body><![CDATA[ abc[this is a message]]]></body> <thread>c9519b52a69c45138fbde716a18b4687</thread> </message>

does this CDATA><![CDATA[abc[ this is a message]]]>)accord with promise?(abc[ this is a message] in the CDATA body)

if it dose, the class org.jivesoftware.multiplexer.net.XMLLightweightParser can not parser it correctly.

the code below should be rewritten.

if (status == XMLLightweightParser.INSIDE_CDATA) { if (ch == XMLLightweightParser.CDATA_END[cdataOffset]) { cdataOffset++; if (cdataOffset == XMLLightweightParser.CDATA_END.length) { status = XMLLightweightParser.OUTSIDE; cdataOffset = 0; }


else{ cdataOffset = 0; }

i’'m looking for your help.thx!

Message was edited by: intelchen

CDATA sections are not allowed in XMPP. No idea what Openfire does, but it should disconnect the stream if you send something like this.