[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

A debugging puzzle with XML

From: Marcin Borkowski
Subject: A debugging puzzle with XML
Date: Wed, 28 Jan 2015 18:33:52 +0100

Hi there,

as we all know, everything is better with XML, so here's a puzzle for
all interested (I call it a puzzle and not a bug because I finally
solved it).

Download the xmlgen library ( and
execute this code:

(require 'xmlgen)
(with-temp-file "foo.xml"
  (insert (xmlgen '(hello (world (of (xml) "!")))))).

Visit file foo.xml, do this:

C-x h M-x sgml-pretty-print

and enjoy your beautifully formatted (and indented!) XML code.

Now rinse and repeat, but with one change:

(require 'xmlgen)
(with-temp-file "foo.xml"
  (insert (xmlgen '(hello (world (of (xml) "!")))))
  (sgml-pretty-print (point-min) (point-max)))

and answer this question: where have all the indents go?



Marcin Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University

reply via email to

[Prev in Thread] Current Thread [Next in Thread]