From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: Problems with xml-parse-string Date: Thu, 23 Sep 2010 11:43:17 -0400 Message-ID: <87vd5wo48a.fsf@stupidchicken.com> References: <87pqw6d7nz.fsf@stupidchicken.com> <87zkvaiked.fsf@stupidchicken.com> <87vd5ymptn.fsf@stupidchicken.com> <87vd5x7ty2.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1285258319 14728 80.91.229.12 (23 Sep 2010 16:11:59 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 23 Sep 2010 16:11:59 +0000 (UTC) Cc: emacs-devel@gnu.org To: Leo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 23 18:11:54 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OyoOl-0003VO-MV for ged-emacs-devel@m.gmane.org; Thu, 23 Sep 2010 18:11:54 +0200 Original-Received: from localhost ([127.0.0.1]:48735 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oyo2d-0000xO-Np for ged-emacs-devel@m.gmane.org; Thu, 23 Sep 2010 11:48:59 -0400 Original-Received: from [140.186.70.92] (port=51531 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OynxF-0006Jz-6w for emacs-devel@gnu.org; Thu, 23 Sep 2010 11:43:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OynxA-0002VL-0J for emacs-devel@gnu.org; Thu, 23 Sep 2010 11:43:21 -0400 Original-Received: from pantheon-po16.its.yale.edu ([130.132.50.72]:47603) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oynx9-0002V9-Tc for emacs-devel@gnu.org; Thu, 23 Sep 2010 11:43:19 -0400 Original-Received: from furry (dhcp128036014154.central.yale.edu [128.36.14.154]) (authenticated bits=0) by pantheon-po16.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id o8NFhIOw025293 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 23 Sep 2010 11:43:18 -0400 Original-Received: by furry (Postfix, from userid 1000) id 4D77C16D402; Thu, 23 Sep 2010 11:43:17 -0400 (EDT) In-Reply-To: (Leo's message of "Thu, 23 Sep 2010 06:53:43 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:130673 Archived-At: 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.