Comparison

util/xml.lua @ 12121:2162e86029b6

util.xml: Use variable instead of constant for consistency (thanks Thijs)
author Matthew Wild <mwild1@gmail.com>
date Sun, 26 Dec 2021 20:37:20 +0000
parent 11127:1d9cd1abc660
child 12180:53e0ae770917
comparison
equal deleted inserted replaced
12120:0fcd80a55f15 12121:2162e86029b6
62 stanza:text(data); 62 stanza:text(data);
63 end 63 end
64 function handler:EndElement() 64 function handler:EndElement()
65 stanza:up(); 65 stanza:up();
66 end 66 end
67 local parser = lxp.new(handler, "\1"); 67 local parser = lxp.new(handler, ns_separator);
68 local ok, err, line, col = parser:parse(xml); 68 local ok, err, line, col = parser:parse(xml);
69 if ok then ok, err, line, col = parser:parse(); end 69 if ok then ok, err, line, col = parser:parse(); end
70 --parser:close(); 70 --parser:close();
71 if ok then 71 if ok then
72 return stanza.tags[1]; 72 return stanza.tags[1];