Pubsub: Received message has null XML tags

So I’m subscribed to a pubsub node and I’m successfully receiving published messages. However, all but the item tag of the XML document are showing up as null. So, for example, if my message is:

 <event xmlns="[](">

      <items node="subscribednode" >

           <item id="bPm2pAII4q4p3lp" >

                <status xmlns="somenamespace" time="2012-01-11 15:10:39.874" >



When I receive the message, I see: nullnullautonullnullonnullnull

So the values in between the XML tags are displayed but the enclosing XML tags are converted to null. I’ve looked at the message in Psi and the message with the tags is correctly received.

The code I’m using to read the message is as follows:

public void handlePublishedItems(ItemPublishEvent items) {

  try {

List payloads = items.getItems();

     for(PayloadItem item : payloads) {

                                                        String payloadXml = item.toXML().toString();

                                                        Log.i(tag, "Payload: " + payloadXml);


                        } catch(Exception e) {

         Log.e(tag, "Unable to parse XML: " + e);