# File lib/jabber4r/protocol.rb, line 370 370: def to_xml 371: e = XMLElement.new("presence") 372: e.add_attribute("id", @id) if @id 373: e.add_attribute("from", @from) if @from 374: e.add_attribute("to", @to) if @to 375: e.add_attribute("type", @type) if @type 376: e.add_child("show").add_data(@show) if @show 377: e.add_child("status").add_data(@status) if @status 378: e.add_child("priority") if @priority 379: e.to_s 380: end