[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] sxpath does not preserve node order
From: |
Sascha Ziemann |
Subject: |
[Chicken-users] sxpath does not preserve node order |
Date: |
Thu, 04 Dec 2014 21:04:36 +0100 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 |
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 "//address@hidden'header']//*/text()")
(with-input-from-request
"http://www.imdb.com/title/tt0497465/"
#f html->sxml))
returns
("Vicky Cristina Barcelona" "(" ")" "2008")
But the correct node order would be
("Vicky Cristina Barcelona" "(" "2008" ")")
If I try the same in Firebug the order is correct:
$x("//address@hidden'header']//*/text()")
[<TextNode textContent="Vicky Cristina Barcelona">,
<TextNode textContent="(">,
<TextNode textContent="2008">,
<TextNode textContent=")">]
Is this a bug? Or is the node order unspecified?
Regards,
Sascha
- [Chicken-users] sxpath does not preserve node order,
Sascha Ziemann <=