xml-gen.el --- A DSL for generating XML.
  Home FAQ Contact Sign in
gnu.emacs.sources only
 
Advanced search
POPULAR GROUPS

more...

gnu.emacs.sources Profile…
 Up
xml-gen.el --- A DSL for generating XML.         


Author: Phil Jackson
Date: Aug 15, 2008 02:29

Hi,

There may already be something like this but I couldn't find it (I wrote
the majority of it on the train this morning, so it may need some
polish):

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

Produces this (though wrapped):
Show full article (4.01Kb)
1 Comment
Re: xml-gen.el --- A DSL for generating XML.         


Author: Phil Jackson
Date: Aug 15, 2008 16:24

Phil Jackson shellarchive.co.uk> writes:
> There may already be something like this but I couldn't find it (I wrote
> the majority of it on the train this morning, so it may need some
> polish)

Well that turned out to be true, sorry. More thoughtful version
attached...

;;; xml-gen.el --- A DSL for generating XML.

;; Copyright (C) 2008 Philip Jackson

;; Author: Philip Jackson shellarchive.co.uk>
;; Version: 0.4

;; This file is not currently part of GNU Emacs.

;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as
;; published by the Free Software Foundation; either version 2, or (at
;; your option) any later version.

;; This program is distributed in the hope that it will be useful, but
;; WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;; General Public License for more details.
Show full article (3.79Kb)
no comments