Am 04.12.2014 um 21:25 schrieb Sascha Ziemann:
It seems to me that the use of //* duplicates the inner 'a' node:
That's not what it does. I'm not completely sure that XPath does
require this behavior, but I tend to believe this is the right thing to
do. // is supposed to yield all descendant
At Fri, 05 Dec 2014 11:55:39 +0100,
Jörg F. Wittenberger wrote:
Am 04.12.2014 um 21:25 schrieb Sascha Ziemann:
It seems to me that the use of //* duplicates the inner 'a' node:
That's not what it does. I'm not completely sure that XPath does
require this behavior, but I tend to believe
Hi,
I have a problem with Sxpath not preserving the node order.
This example:
(use regex)
(use http-client)
(use sxpath)
(use html-parser)
((sxpath //h1[@class='header']//*/text())
(with-input-from-request
http://www.imdb.com/title/tt0497465/;
#f html-sxml))
returns
It seems to me that the use of //* duplicates the inner 'a' node:
(begin
(newline)
(pp ((sxpath //h1[@class='header']//*)
(with-input-from-request
http://www.imdb.com/title/tt0497465/;
#f html-sxml
prints
((span (@ (class itemprop) (itemprop name)) Vicky Cristina
On Thu, Dec 04, 2014 at 09:25:38PM +0100, Sascha Ziemann wrote:
It seems to me that the use of //* duplicates the inner 'a' node:
(begin
(newline)
(pp ((sxpath //h1[@class='header']//*)
(with-input-from-request
http://www.imdb.com/title/tt0497465/;
#f html-sxml
Hi Sascha,
((sxpath //h1[@class='header']//*/text())
(with-input-from-request
http://www.imdb.com/title/tt0497465/;
#f html-sxml))
This isn't a fix for your problem: it's a plug for my egg, rest-bind,
which might be useful to you if you're binding a lot of HTTP APIs like this.