Get the first <x/> element in this stanza, or nil if none found.
Optional, find the first <x/> element having this xmlns,
wanted_xmlns can also be a derivate of XMPPElement from which the namespace will be taken
or nil
# 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