Pubsub: Is there an example?

Hello,

Does Openfire/Smack have any examples on how to utilize pubsub to publish and receive messages from a specific node? I have looked around and have not been able to find any examples. Does anyone have an example of how to do this?

Thanks,

Marge