equal
deleted
inserted
replaced
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 |