chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] sxpath does not preserve node order


From: Sascha Ziemann
Subject: Re: [Chicken-users] sxpath does not preserve node order
Date: Thu, 04 Dec 2014 21:25:38 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

It seems to me that the use of //* duplicates the inner 'a' node:

(begin
  (newline)
  (pp ((sxpath "//address@hidden'header']//*")
     (with-input-from-request
      "http://www.imdb.com/title/tt0497465/";
      #f html->sxml))))

prints

((span (@ (class "itemprop") (itemprop "name")) "Vicky Cristina Barcelona")
 (span (@ (class "nobr"))
       "("
       (a (@ (href "/year/2008/?ref_=tt_ov_inf")) "2008")
       ")")
 (a (@ (href "/year/2008/?ref_=tt_ov_inf")) "2008"))

Although there is only one hyper-ref in the HTML code.




reply via email to

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