# File lib/jabber4r/protocol.rb, line 407
407:       def Iq.from_element(session, element)
408:         iq = Iq.new(session)
409:         iq.from = Jabber::JID.new(element.attr_from) if element.attr_from
410:         iq.to = Jabber::JID.new(element.attr_to) if element.attr_to
411:         iq.type = element.attr_type
412:         iq.id = element.attr_id
413:         iq.session=session
414:         iq.xmlns=element.query.attr_xmlns
415:         iq.data=element.query
416:         return iq
417:       end