powered by Jive Software

Parsing mechanism of Smack

Hi all,

I’m java newbie and a complete beginner to Smack. I do not understand parsing mechanism of Smack. Here is my Question

PacketListener myListener = new PacketListener(){

public void[/b] processPacket(Packet packet) {

//Assume we have a XmlPullParser instance called “xpp” and two objects

// myPacketExtensionProvider[/b] und myExtensionProvider[/b]

//how can I use these classes here?


// MyPacketExtension PckExt = //(MyPacketExtension)myPacketExtensionProvider.parseExtension(xpp);





// MyPacketExtension PckExt = //(MyPacketExtension)packet.getExtension(“myelement”, “mynamespace”);



In the first case do not know myPacketExtensionProvider, which package he is to work on.

In the second case do not know packet.getExtension, how a package is to be parsed.

Can someone explain to me, how I can convert a package into an object?

Thanks in advance,


The problem is solved.