help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: elispQ: How can I extract text from #("text" ... )


From: Tim X
Subject: Re: elispQ: How can I extract text from #("text" ... )
Date: Sat, 05 Apr 2008 14:30:31 +1100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

Mirko <mvukovic@nycap.rr.com> 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


reply via email to

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