def to_roster_xml(id)
      doc = Nokogiri::XML::Document.new
      doc.create_element('iq', 'id' => id, 'type' => 'result') do |el|
        el << doc.create_element('query', 'xmlns' => 'jabber:iq:roster') do |query|
          @roster.sort!.each do |contact|
            query << contact.to_roster_xml
          end
        end
      end
    end
def to_roster_xml(id)
      doc = Nokogiri::XML::Document.new
      doc.create_element('iq', 'id' => id, 'type' => 'result') do |el|
        el << doc.create_element('query', 'xmlns' => 'jabber:iq:roster') do |query|
          @roster.sort!.each do |contact|
            query << contact.to_roster_xml
          end
        end
      end
    end
Returns this user's roster contacts as an iq query element.