a simple, sugary xml generation library for lua
https://512b.dev/ll/
| curry.lua | add even further funk to curry.lua because it wasn't actually working for functions of arity >2 beforehand | |
| LICENSE | it is no longer 2025 | |
| llxml.lua | allow any object with a __tostring metamethod to be rendered, instead of restricting only to strings, lists, and trees | |
| README.md | readme | |
llxml
a simple lua xml generator, designed with some funky syntax sugar in mind
(bundled with an even funkier currying function)
local tag = require 'llxml'
local curry = require 'curry'
local function html(title, body)
return tag.html {
tag.head {
tag.title (title),
tag.link
:type 'text/css'
:rel 'stylesheet'
:href 'foo.css',
},
tag.body {
tag.h1 (title),
body
},
}
end
html = curry(html, 2)
local page = html 'llxml html example' {
tag.p {
'rendered with ',
tag.a 'llxml'
:href 'https://codeberg.org/ufrag/llxml',
'.',
},
}
print(page:build())