Comparison

util/stanza.lua @ 3885:aa6ca3a7b940

util.stanza: Iterate on childtags instead of all childs.
author Kim Alvefur <zash@zash.se>
date Fri, 17 Dec 2010 17:28:05 +0100
parent 3848:3933e007f829
child 4132:ccc16434dbe2
comparison
equal deleted inserted replaced
3884:b623ff8b2202 3885:aa6ca3a7b940
240 if not error_tag then 240 if not error_tag then
241 return nil, nil, nil; 241 return nil, nil, nil;
242 end 242 end
243 type = error_tag.attr.type; 243 type = error_tag.attr.type;
244 244
245 for child in error_tag:children() do 245 for child in error_tag:childtags() do
246 if child.attr.xmlns == xmlns_stanzas then 246 if child.attr.xmlns == xmlns_stanzas then
247 if not text and child.name == "text" then 247 if not text and child.name == "text" then
248 text = child:get_text(); 248 text = child:get_text();
249 elseif not condition then 249 elseif not condition then
250 condition = child.name; 250 condition = child.name;