Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
35 lines (28 sloc) 816 Bytes

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>

To run the unit tests, run from the directory where the repository is checked out:

emacs -Q -batch -L . -l xmlgen-test.el -f ert-run-tests-batch-and-exit