Software /
code /
prosody
Comparison
util/xml.lua @ 6777:5de6b93d0190
util.*: Remove use of module() function, make all module functions local and return them in a table at the end
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 21 Feb 2015 10:36:37 +0100 |
parent | 6669:7da8b6bc0966 |
child | 6978:30c96a5db360 |
comparison
equal
deleted
inserted
replaced
6774:3965662ae091 | 6777:5de6b93d0190 |
---|---|
1 | 1 |
2 local st = require "util.stanza"; | 2 local st = require "util.stanza"; |
3 local lxp = require "lxp"; | 3 local lxp = require "lxp"; |
4 | 4 |
5 module("xml") | 5 local _ENV = nil; |
6 | 6 |
7 local parse_xml = (function() | 7 local parse_xml = (function() |
8 local ns_prefixes = { | 8 local ns_prefixes = { |
9 ["http://www.w3.org/XML/1998/namespace"] = "xml"; | 9 ["http://www.w3.org/XML/1998/namespace"] = "xml"; |
10 }; | 10 }; |
52 return ok, err.." (line "..line..", col "..col..")"; | 52 return ok, err.." (line "..line..", col "..col..")"; |
53 end | 53 end |
54 end; | 54 end; |
55 end)(); | 55 end)(); |
56 | 56 |
57 parse = parse_xml; | 57 return { |
58 return _M; | 58 parse = parse_xml; |
59 }; |