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

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

bug#34685: 26.1; function nnrss-get-namespace-prefix always returns nil


From: Lars Ingebrigtsen
Subject: bug#34685: 26.1; function nnrss-get-namespace-prefix always returns nil
Date: Tue, 10 Aug 2021 15:48:06 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Benjamin Riefenstahl <b.riefenstahl@turtle-trading.net> writes:

> I originally just copied this from the output of the debugger, so this
> is what nnrss-get-namespace-prefix gets passed.  I just checked, the
> structure is the result of xml-parse-region, is that supposed to create
> something that matches the use of dom-search?  When I try it on some
> test XML it does create this same structure again.
>
> Test code:
>
>     (with-temp-buffer
>       (insert "<rss xmlns:content='http://purl.org/rss/1.0/modules/content/'>
>                  <channel />
>                </rss>")
>       (xml-parse-region (point-min) (point-max)))

Ah, I see.  xml-parse-region returns a list of dom objects, while
libxml-parse-xml-region just returns a single object, which is probably
where the confusion here originates from.  (dom.el was written after
libxml2 support was added, and written with the output from that in
mind.)

>> (And send a new patch; I've applied your test (adjusted).)
>
> See below.

Thanks; applied to Emacs 28.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

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