Software /
code /
prosody
Changeset
4133:71b38dca22c3
Merge 0.8->trunk
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 31 Jan 2011 23:17:11 +0000 |
parents | 4131:81636fa77cab (current diff) 4132:ccc16434dbe2 (diff) |
children | 4134:3a6fedc80bcf |
files | |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/util/stanza.lua Sat Jan 29 04:54:08 2011 +0500 +++ b/util/stanza.lua Mon Jan 31 23:17:11 2011 +0000 @@ -108,6 +108,14 @@ end end +function stanza_mt:get_child_text(name, xmlns) + local tag = self:get_child(name, xmlns); + if tag then + return tag:get_text(); + end + return nil; +end + function stanza_mt:child_with_name(name) for _, child in ipairs(self.tags) do if child.name == name then return child; end