*/
public class PubSubProvider implements IQProvider
{
public IQ parseIQ(XmlPullParser parser) throws Exception
{
PubSub pubsub = new PubSub();
String namespace = parser.getNamespace();
pubsub.setPubSubNamespace(PubSubNamespace.valueOfFromXmlns(namespace));
boolean done = false;
while (!done)
{
int eventType = parser.next();
if (eventType == XmlPullParser.START_TAG)
{
PacketExtension ext = PacketParserUtils.parsePacketExtension(parser.getName(), namespace, parser);
if (ext != null)
{
pubsub.addExtension(ext);
}
}
else if (eventType == XmlPullParser.END_TAG)
{
if (parser.getName().equals("pubsub"))