Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
An s-expression to XML DSL in elisp
Emacs Lisp
Tree: 3849d94ef6

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
README.md
xmlgen.el
xmlgen.etest

README.md

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
          (head
           (title "hello")
           (meta :something "hi"))
          (body
           (h1 "woohhooo")
           (p "text")
           (p "more text"))))

produces this (though wrapped):

<html>
  <head>
    <title>hello</title>
    <meta something="hi" />
  </head>
  <body>
    <h1>woohhooo</h1>
    <p>text</p>
    <p>more text</p>
  </body>
</html>
Something went wrong with that request. Please try again.