Commit 48f214a1 authored by david's avatar david

Revision: cxml--devel--1.0--patch-74

Archive: david@knowledgetools.de--cxml
Creator: David Lichteblau <david@knowledgetools.de>
Date: Fri Feb  6 20:57:15 CET 2004
Standard-date: 2004-02-06 19:57:15 GMT
Modified-files: xml/dom-impl.lisp
New-patches: david@knowledgetools.de--cxml/cxml--devel--1.0--patch-74
Summary: fixed get-elements-by-tag-name not to include the argument itself

fixed get-elements-by-tag-name not to include the argument itself
parent 667b50ab
......@@ -191,12 +191,13 @@
(setf tag-name (rod tag-name))
(let ((wild-p (rod= tag-name '#.(string-rod "*"))))
(labels ((walk (n)
(when (and (dom:element-p n)
(or wild-p (rod= tag-name (dom:node-name n))))
(push n result))
(mapc #'walk (dom:child-nodes n))))
(walk node)
(reverse result)))))
(dolist (c (dom:child-nodes n))
(when (dom:element-p c)
(when (or wild-p (rod= tag-name (dom:node-name c)))
(push c result))
(walk c)))))
(walk node)))
(reverse result)))
(defmethod dom:get-elements-by-tag-name ((document document) tag-name)
(get-elements-by-tag-name-internal document tag-name))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment