|
# File jabber4r/protocol.rb, line 1163
def to_s
begin
result = "\n<#{@element_tag}"
@attributes.each {|key, value| result += (' '+key+'"'+value+'"') }
if @element_children.size>0 or @element_data
result += ">"
else
result += "/>"
end
result += @element_data if @element_data
@element_children.each_value {|array| array.each {|je| result += je.to_s} }
result += "\n" if @element_children.size>0
result += "</#{@element_tag}>" if @element_children.size>0 or @element_data
result
rescue => exception
puts exception.to_s
end
end
|