[jdev] Pubsub payload as cdata

pablo platt pablo.platt at gmail.com
Mon Jun 25 00:53:03 UTC 2012


Hi,

When publishing an item to a pubsub node, does the item has to be an xml
element like

<item id='bnd81g37d61f49fgn581'>
    <entry xmlns='http://www.w3.org/2005/Atom'>
        <title>something</title>
        <link>http://example.com/1</link>
    </entry>
</item>

or can a user just publish cdata like

<item id='avatar_url'>
    http://example.com/myavatar.jpeg
</item>

The second form make the database representation of the data much cleaner
when appropriate.
In a web admin for example, it is much easier to see the data.

I understand the importance of the namespace for clients that should handle
different kinds of nodes
but for a dedicate client it might suit well.

In a RDBMS the item payload is probably saved as the xml as string.
One could have a field for the payload tag, payload namespace and payload
body.

What is the best practice?

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.jabber.org/pipermail/jdev/attachments/20120625/ca48a947/attachment.html>


More information about the JDev mailing list