emacs-pretest-bug
[Top][All Lists]
Advanced

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

xml-get-children doesn't handle strings


From: Magnus Henoch
Subject: xml-get-children doesn't handle strings
Date: Mon, 12 Apr 2004 18:46:02 +0200
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Parsing a tag like

<foo><bar/>baz</foo>

with xml-parse-tag gives (foo nil (bar nil) "baz").  Trying to get the
"bar" sub-tag with

(xml-get-children '(foo nil (bar nil) "baz") 'bar)

gives:

Debugger entered--Lisp error: (wrong-type-argument listp "baz")
  xml-get-children((foo nil (bar nil) "baz") bar)
  eval((xml-get-children (quote (foo nil ... "baz")) (quote bar)))
  eval-last-sexp-1(t)
  eval-last-sexp(t)
  eval-print-last-sexp()
  call-interactively(eval-print-last-sexp)

It seems to me that the proper behaviour would be to ignore the string
and only care about the sub-tags.

This is independent of the position of the string in the XML data, as
xml-get-children has to loop through all the children anyway.





reply via email to

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