Comparison

util/xml.lua @ 6663:d3023dd07cb6

portmanager, s2smanager, sessionmanager, stanza_router, storagemanager, usermanager, util.xml: Add luacheck annotations
author Matthew Wild <mwild1@gmail.com>
date Wed, 06 May 2015 19:20:07 +0100
parent 5776:bd0ff8ae98a8
child 6669:7da8b6bc0966
comparison
equal deleted inserted replaced
6662:5ef319efedba 6663:d3023dd07cb6
9 ["http://www.w3.org/XML/1998/namespace"] = "xml"; 9 ["http://www.w3.org/XML/1998/namespace"] = "xml";
10 }; 10 };
11 local ns_separator = "\1"; 11 local ns_separator = "\1";
12 local ns_pattern = "^([^"..ns_separator.."]*)"..ns_separator.."?(.*)$"; 12 local ns_pattern = "^([^"..ns_separator.."]*)"..ns_separator.."?(.*)$";
13 return function(xml) 13 return function(xml)
14 --luacheck: ignore 212/self
14 local handler = {}; 15 local handler = {};
15 local stanza = st.stanza("root"); 16 local stanza = st.stanza("root");
16 function handler:StartElement(tagname, attr) 17 function handler:StartElement(tagname, attr)
17 local curr_ns,name = tagname:match(ns_pattern); 18 local curr_ns,name = tagname:match(ns_pattern);
18 if name == "" then 19 if name == "" then