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: Tue, 21 Sep 2010 22:26:02 -0400 Message-ID: <87zkvaiked.fsf@stupidchicken.com> References: <87pqw6d7nz.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1285122376 8997 80.91.229.12 (22 Sep 2010 02:26:16 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 22 Sep 2010 02:26:16 +0000 (UTC) Cc: emacs-devel@gnu.org To: Leo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 22 04:26:15 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 1OyF2D-0005T6-5t for ged-emacs-devel@m.gmane.org; Wed, 22 Sep 2010 04:26:13 +0200 Original-Received: from localhost ([127.0.0.1]:55170 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OyF2C-0003mY-Gp for ged-emacs-devel@m.gmane.org; Tue, 21 Sep 2010 22:26:12 -0400 Original-Received: from [140.186.70.92] (port=35980 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OyF26-0003l6-Q8 for emacs-devel@gnu.org; Tue, 21 Sep 2010 22:26:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OyF25-0003Rl-CF for emacs-devel@gnu.org; Tue, 21 Sep 2010 22:26:06 -0400 Original-Received: from pantheon-po24.its.yale.edu ([130.132.50.118]:55503) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OyF25-0003Rb-5k for emacs-devel@gnu.org; Tue, 21 Sep 2010 22:26:05 -0400 Original-Received: from furry (adsl-99-103-105-16.dsl.wlfrct.sbcglobal.net [99.103.105.16]) (authenticated bits=0) by pantheon-po24.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id o8M2Q3HG006097 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 21 Sep 2010 22:26:03 -0400 Original-Received: by furry (Postfix, from userid 1000) id D1D0A16D402; Tue, 21 Sep 2010 22:26:02 -0400 (EDT) In-Reply-To: (Leo's message of "Wed, 22 Sep 2010 00:24:16 +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:130593 Archived-At: Leo writes: > On 2010-09-22 00:00 +0100, Chong Yidong wrote: >> From this point of view, the new functions should be called >> xml-parse-string-internal or something like that. > > The new function actually is quite usable. Its output is slightly > cleaner than that of xml.el. No doubt, but that's not my point. Ideally, Emacs should provide a single interface for parsing XML. What I have in mind is to rename xml.el's xml-parse-string, which is an internal function, to xml--parse, and provide something like this: (defun xml-parse-string (str) (if (boundp 'xml-parse-string-internal) (xml-parse-string-internal str) (xml-parse-string-elisp str))) with similar functions for the current xml-parse-region and xml-parse-file. This would solve our namespace clash problem, and be cleaner. This assumes that the output of the new libxml2 functions is similar (or can be made similar) to that of the old elisp parser.