From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim X Newsgroups: gmane.emacs.help Subject: Re: elispQ: How can I extract text from #("text" ... ) Date: Sat, 05 Apr 2008 14:30:31 +1100 Organization: Rapt Technologies Message-ID: <87y77tyo4o.fsf@lion.rapttech.com.au> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1207366888 22593 80.91.229.12 (5 Apr 2008 03:41:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 5 Apr 2008 03:41:28 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Apr 05 05:42:01 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JhzHz-000313-5f for geh-help-gnu-emacs@m.gmane.org; Sat, 05 Apr 2008 05:41:59 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JhzHM-0007mB-G4 for geh-help-gnu-emacs@m.gmane.org; Fri, 04 Apr 2008 23:41:20 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local02.nntp.dca.giganews.com!nntp.internode!news.internode.POSTED!not-for-mail Original-NNTP-Posting-Date: Fri, 04 Apr 2008 22:30:32 -0500 Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:S9acmD8ND9A6O8DhSow1MmiPFgM= Original-Lines: 34 X-Usenet-Provider: http://www.giganews.com Original-NNTP-Posting-Host: 121.44.102.175 Original-X-Trace: sv3-J3oErkN4hkzOVFpvVxNWPJIIbnSEM+gve1ZyDg3J+SnYpekuEaMa5L3EYAjDtpmWUuB/6BWPSu5mzO8!agjv67+fjBiAT47mRUGoil2i3OoNqrRIx0M0AfLbvoLFT03cmFvWCaG5hIAIEE6zUFJjaiRIZM0= Original-X-Complaints-To: abuse@internode X-DMCA-Complaints-To: abuse@internode X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.38 Original-Xref: shelby.stanford.edu gnu.emacs.help:157702 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:53067 Archived-At: Mirko writes: > Hi, > > I am parsing an xml file using xml.el, and I am getting for attributes > values such as: > #("Typically only electric field is assigned" 0 41 (face font-lock- > string-face fontified t))) > > Now, these are variables of type string. How can I extract just the > text from it? > I'm not sure I understand what your trying to do. The result you are getting looks like an elisp list structure to me. You should be able to extract what you want using car, cdr and friends. e.g (setq my-var ("Typically only electric field is assigned" 0 41 (face font-lock- string-face fontified t))) (car my-var) => "Typically only electric field is assigned" (cdr my-var) => (0 41 (face font-lock-string-face fontified t)) etc Tim -- tcross (at) rapttech dot com dot au