Get the first <x/> element in this stanza, or nil if none found.
wanted_xmlns |
|
wanted_xmlns can also be a derivate of XMPPElement from which the namespace will be taken
result |
|
# File lib/xmpp4r/x.rb, line 24 def x(wanted_xmlns=nil) if wanted_xmlns.kind_of? Class and wanted_xmlns.ancestors.include? XMPPElement wanted_xmlns = wanted_xmlns.new.namespace end each_element('x') { |x| if wanted_xmlns.nil? or wanted_xmlns == x.namespace return x end } nil end
Generated with the Darkfish Rdoc Generator 2.