AnsweredAssumed Answered

How do I get the CDATA from a MultiUserChat Message?

Question asked by Geoff Knauth on Jun 5, 2015
Latest reply on Jun 5, 2015 by Geoff Knauth

[ Note:  I posted this on StackOverflow first, but since the question didn't attract much attention, I thought I might have better luck here.  The original question is at: http://stackoverflow.com/questions/30671326/how-do-i-get-the-cdata-from-a-smack- xmpp-api-multiuserchat-message ]

 

Smack's debugging console messages show me a full message including the message detail in the CDATA I'm looking for:

 

11:45:05 AM RECV (0): <
11:45:05 AM RECV (0): message to="me@server.com/Smack" type="groupchat" from="roomname@conf.server.com/roomname-abc"><body>ABCD issues valid 2015-06-05T15:45:00Z</body><html xmlns="http://jabber.org/protocol/xhtml-im"><body xmlns="http://www.w3.org/1999/xhtml">ABCD issues valid 2015-06-05T15:45:00Z</body></html>
  <x xmlns="roomname-abc" issue="2015-06-05T15:45:00Z" someid="foo" id="1234.5678"><![CDATA[

+------------------------+
| THIS IS MESSAGE DETAIL |
| INSIDE THE CDATA       |
| THAT I REALLY NEED     |
+------------------------+

]]></x></message>

 

But in my code, when I look at a Message, all the detail has been stripped out from inside the <x></x> element, including some of its attributes:

 

<message to='me@server.com/Smack' from='roomname@conf.server.com/roomname-abc' type='groupchat'><body>ABCD issues valid 2015-06-05T15:45:00Z</body><html xmlns='http://jabber.org/protocol/xhtml-im'><body xmlns="http://www.w3.org/1999/xhtml">ABCD issues valid 2015-06-05T15:45:00Z</body></html>
  <x xmlns='roomname-abc'></x></message>

 

What happened to that detail, how did the console see it but I can't, how can I get the CDATA?

Outcomes