tests/test_util_xml.lua
author Matthew Wild <mwild1@gmail.com>
Tue, 08 May 2018 07:11:33 +0100
changeset 8792 4ae8dd415e94
parent 7244 5e7797822f19
child 7246 6e6eea2124c5
permissions -rw-r--r--
mod_websocket: Store the request object on the session for use by other modules

function parse(parse)
	local x =
[[<x xmlns:a="b">
	<y xmlns:a="c"> <!-- this overwrites 'a' -->
	    <a:z/>
	</y>
	<a:z/> <!-- prefix 'a' is nil here, but should be 'b' -->
</x>
]]
	local stanza = parse(x);
	assert_equal(stanza.tags[2].attr.xmlns, "b");
end