util/stanza.lua
changeset 3475 0307a3ac3885
parent 3474 730876bbe4e6
child 3477 6350b114e0e4
equal deleted inserted replaced
3474:730876bbe4e6 3475:0307a3ac3885
   120 
   120 
   121 function stanza_mt:children()
   121 function stanza_mt:children()
   122 	local i = 0;
   122 	local i = 0;
   123 	return function (a)
   123 	return function (a)
   124 			i = i + 1
   124 			i = i + 1
   125 			local v = a[i]
   125 			return a[i];
   126 			if v then return v; end
       
   127 		end, self, i;
   126 		end, self, i;
   128 end
   127 end
   129 
   128 
   130 function stanza_mt:matched_children(name, xmlns)
   129 function stanza_mt:matched_children(name, xmlns)
   131 	xmlns = xmlns or self.attr.xmlns;
   130 	xmlns = xmlns or self.attr.xmlns;