storagemanager: Capitalize log message
[prosody.git] / util / xml.lua
index 6dbed65d2f5b1c144890b17cec5511386a8643cd..733d821ad7c8b87dc93d7e4a0b3ab2cfa030fd85 100644 (file)
@@ -2,7 +2,7 @@
 local st = require "util.stanza";
 local lxp = require "lxp";
 
-module("xml")
+local _ENV = nil;
 
 local parse_xml = (function()
        local ns_prefixes = {
@@ -11,6 +11,7 @@ local parse_xml = (function()
        local ns_separator = "\1";
        local ns_pattern = "^([^"..ns_separator.."]*)"..ns_separator.."?(.*)$";
        return function(xml)
+               --luacheck: ignore 212/self
                local handler = {};
                local stanza = st.stanza("root");
                function handler:StartElement(tagname, attr)
@@ -38,7 +39,7 @@ local parse_xml = (function()
                function handler:CharacterData(data)
                        stanza:text(data);
                end
-               function handler:EndElement(tagname)
+               function handler:EndElement()
                        stanza:up();
                end
                local parser = lxp.new(handler, "\1");
@@ -53,5 +54,6 @@ local parse_xml = (function()
        end;
 end)();
 
-parse = parse_xml;
-return _M;
+return {
+       parse = parse_xml;
+};