Skip to content
An s-expression to XML DSL in elisp
Emacs Lisp
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Generate xml using sexps with the function `xmlgen':

(xmlgen '(p :class "big"))      => "<p class=\"big\" />")
(xmlgen '(p :class "big" "hi")) => "<p class=\"big\">hi</p>")

(xmlgen '(html
           (title "hello")
           (meta :something "hi"))
           (h1 "woohhooo")
           (p "text")
           (p "more text"))))

produces this (though wrapped):

    <meta something="hi" />
    <p>more text</p>
Something went wrong with that request. Please try again.