macros - Is there an Emacs Lisp library for generating HTML? -
I am looking for a solution that allows me to write native amex Lisp code and compile time It changes to HTML, like:
(html ((div: "class" post ") (: h1" title ") (:" hello, world! ")) < / Code> Surely I can, but I have a project around this problem, so I'm interested.
As you get XML from the list structure I found the disappointment with the `xmlgen` package, which supports the format, it is not the inverse of the iMax.
I added it to my copy of XMLml:
;; it parses XML-;; ### autoload (defun xml-gen) makes a regular for inversion of "form and amp; alternate alm level" in a sexpy XML Change: '(p: class \ "bigger \")) => \ "& Lt; p class = \\\" big \\\ "/> \" "(two (level (or level 0)) () (cond (number number)) (number (stringp form) ) ((Stripp form)) ((List P Form) (Destructive-Bind (XML) (XML-Gene-Extract-Plast Form) (Let's (L (Car XML)) (Unless (symbolP L) ("Element" should be a symbol ('% S' found). "L)) (Setic L (symbol-name L)) (Context" & lt; "el (xml-gen-attr-to - string ethers) (If (& gt; (length xml) 1) (Connection "& gt ; "(Mappanket (lambda (s) (xml-gen s el (level 1+)) (cdr xml)" ") " el "& gt;") "/ & gt;"))) (Defun xml-gen-attr-to-stri NG (plast) (comatat (lapda (p)) (contact "" (symbol-name (car p)) "= \" "( CDR p) ")") () () () (if (= 1 (length children)) children (remove-if-not 'listp children'))) (xml-node-attributes list)) Note: Its interface is xml-gen
(string-par (xml-xmlgen which is the original parsing).
With this interface, gene (car (XML-Parse-A) Setr & lt; Some-area-xml & gt;))) & lt; Some-field-of-xml> gt;
and
(equals (car (XML-pars-field (insert (XML-GN and Lt; a few xml-form & gt;)))) new xml-gen around & lt; Does not attempt to preserve white space, which generates xml-parse-region rafts ine.
Comments
Post a Comment