[s-xml-devel] Getting XML attributes

Peter BARABAS peter.barabas at gmail.com
Sat Oct 15 09:05:05 UTC 2005


Hello,


Is there a way to get the attributes of an element via a specified
"path"? E.g. something like:

(let ((xml "<changelog><patch author='Peter BARABAS' local_date='Fri
Apr 15 11:43:05 CEST 2005' inverted='False' <name>Added
plan.</name></patch></changelog>"))
  (get-xml-element "//changelog/patch/@local_date" xml))

would return the string "Fri Apr 15 11:43:05 CEST 2005".

A similar approach to get the text content of an element would be useful,

(get-text-element "//changelog/patch/name" xml)

would return "Added plan.".


Thank you for your help.

--
'(Yours parenthetically),
peter barabas.

((call/cc call/cc) (call/cc call/cc))



More information about the s-xml-devel mailing list