[cl-soap-cvs] CVS update: cl-soap/src/lxml.lisp

Sven Van Caekenberghe scaekenberghe at common-lisp.net
Sat Sep 10 19:55:20 UTC 2005


Update of /project/cl-soap/cvsroot/cl-soap/src
In directory common-lisp.net:/tmp/cvs-serv29873/src

Modified Files:
	lxml.lisp 
Log Message:
single symbols are also lxml

Date: Sat Sep 10 21:55:19 2005
Author: scaekenberghe

Index: cl-soap/src/lxml.lisp
diff -u cl-soap/src/lxml.lisp:1.2 cl-soap/src/lxml.lisp:1.3
--- cl-soap/src/lxml.lisp:1.2	Fri Sep  9 16:17:37 2005
+++ cl-soap/src/lxml.lisp	Sat Sep 10 21:55:19 2005
@@ -1,6 +1,6 @@
 ;;;; -*- mode: lisp -*-
 ;;;;
-;;;; $Id: lxml.lisp,v 1.2 2005/09/09 14:17:37 scaekenberghe Exp $
+;;;; $Id: lxml.lisp,v 1.3 2005/09/10 19:55:19 scaekenberghe Exp $
 ;;;;
 ;;;; Some tools to manipulate lxml
 ;;;;
@@ -14,14 +14,14 @@
 (in-package :cl-soap)
 
 (defun lxml-get-tag (lxml)
-  (if (symbolp (first lxml))
-      (first lxml)
-    (first (first lxml))))
+  (cond ((symbolp lxml) lxml)
+        ((stringp lxml) '())
+        ((symbolp (first lxml)) (first lxml))
+        (t (first (first lxml)))))
 
 (defun lxml-get-attributes (lxml)
-  (if (symbolp (first lxml))
-      '()
-    (rest (first lxml))))
+  (cond ((or (symbolp lxml) (stringp lxml) (symbolp (first lxml))) '())
+        (t (rest (first lxml)))))
 
 (defun lxml-find-tag (tag lxml)
   (find tag lxml :key #'lxml-get-tag))       




More information about the Cl-soap-cvs mailing list