Chong Yidong writes: > Leo writes: > >> On 2010-09-23 00:59 +0100, Stefan Monnier wrote: >>> FWIW, while I haven't use sml.el much, the little bit I've used it was >>> not particularly pleasant, partly because of the odd format. I don't >>> know how/why the xml.el was chosen and how much thought was put into >>> it, but my experience with it is not 100% positive. >> >> That looks like my experience too. > > The main differences in the "new" format are (i) listing attributes as > (:foo bar) inside the element list, rather than in an alist after the > element name, (ii) listing text as (text "foo") rather than "foo", and > (iii) the as-yet-unresolved issue with XML namespaces, which probably > needs to be fixed in xml.c. > > Point (i) is a broken design choice, as I already pointed out. As for > (ii), it is a little nicer to take the cdr of each list member without > checking for stringp. If others thing this is a really good change, I > won't object, though it seems pretty trivial to me. We can add an > optional flag to the xml-* functions to toggle between the two > representations. This patch fixes all the problems above and gives SXML conforming representation of the elements tree. Obviously we would need to patch `xml.el', and provide an interface for accessing tree elements. Thanks, Wojciech