You can use your own wrapper with your own namespace to insert there any data you want:
<item id='avatar_url'> <url xmlns="http://example.com/my_avatar_namespace">http://example.com/myavatar.com</url> </item> Without the url tag it will conflict with the http://jabber.org/protocol/pubsub schema, it seems. On 06/25/2012 07:53 AM, pablo platt wrote: > 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 > > > _______________________________________________ > JDev mailing list > Info: http://mail.jabber.org/mailman/listinfo/jdev > Unsubscribe: [email protected] > _______________________________________________ > -- With best regards, Sergey Dobrov, XMPP Developer and JRuDevels.org founder. _______________________________________________ JDev mailing list Info: http://mail.jabber.org/mailman/listinfo/jdev Unsubscribe: [email protected] _______________________________________________
