<P>Thanks Curtis,
<P>I have not seen any referenced to the RosterParse in Jabber::Net 1.0028. It only seems to show up in the 1.0024 documentation. Is there a way to do this using 1.0028?
<P> <B><I>Curtis Hawthorne <cghawthorne@yahoo.com></I></B> wrote:
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">Rebbaj,<BR><BR>I think what you want is the RosterParse method in<BR>Net::Jabber. It returns a hash with all the information<BR>you need. For instance:<BR><BR>sub InIQ {<BR>my $sid = shift;<BR>my $iq = shift;<BR><BR>my %rosterupdate = $iq->RosterParse($iq);<BR><BR>foreach (keys %rosterupdate) {<BR>print "Name: ", $_->{name}, "\n";<BR>print "Subscription: ", $_->{subscription}, "\n";<BR>print "Ask: ", $_->{ask}, "\n";<BR>print "Groups: ", $_->{groups}, "\n";<BR>}<BR>}<BR><BR>From there you could turn it into an array if you wanted,<BR>but I would think a hash would be easier to work with.<BR><BR>Curtis H.<BR><BR>--- rebbaj rebbaj <REBBAJ2000@YAHOO.CO.UK>wrote:<BR>> <BR>> After some more testing, I got the impression that the<BR>> following callback logic would work. Getting the <ITEM>s<BR>> does not seem to work. Has anybody ever made this work<BR>> before?? <BR>> sub InIQ<BR>> {<BR>> my $sid = shift;<BR>> my $iq = shift; <BR>> my $id = $iq->GetID();<BR>> print "id = $id\n"; # works <BR>> my $type = $iq->GetType();<BR>> print "type = $type\n"; #works <BR>> my $xmlns = $iq->GetQueryXMLNS();<BR>> print "xmlns = $xmlns\n"; #works <BR>> foreach my $query ($iq->GetQuery->GetItems) {<BR>> print ("JID = $query->GetItem()->GetJID\n"); # prints a<BR>> hash<BR>> print ("Name = $query->GetItem()->GetName\n"); #<BR>> prints a hash<BR>> print ("Subscription =<BR>> $query->GetItem()->GetSubscription\n"); # prints a hash<BR>> print ("Group = $query->GetItem()->GetGroup[0]\n"); #<BR>> prints a hash<BR>> }<BR>> } <BR><BR><BR>__________________________________________________<BR>Do you Yahoo!?<BR>Yahoo! Mail Plus - Powerful. Affordable. Sign up now.<BR>http://mailplus.yahoo.com<BR>_______________________________________________<BR>jdev mailing list<BR>jdev@jabber.org<BR>http://mailman.jabber.org/listinfo/jdev</BLOCKQUOTE><p><p><br><hr size=1><a href="http://uk.yahoo.com/mail/tagline_xtra/?http://uk.docs.yahoo.com/mail_storage.html"><b><font face="Arial" size="2">With Yahoo! Mail you can get a bigger mailbox -- choose a size that fits your needs</font></b></a><br>