Comparison

util/stanza.lua @ 3766:0d7137fee360

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 3726:fa516dc2c2de
child 4132:ccc16434dbe2
comparison
equal deleted inserted replaced
3765:0731e5432baa 3766:0d7137fee360
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;