Quantcast
Channel: how to write this xpath query? - Stack Overflow
Browsing all 4 articles
Browse latest View live

Answer by user357812 for how to write this xpath query?

I want to limit my result to 10 latest piece of news/descendant::item[ 10 > last()-position()]/*[ self::title|self::description|self::link|self::pubDate|self::category ]

View Article



Answer by Dimitre Novatchev for how to write this xpath query?

I assume that the latest news are at the top.Use:(//item)[not(position() > 10)]/* [self::title or self::description or self::link or self::pubDate or self::category ]Explanation:This expression...

View Article

Answer by Treemonkey for how to write this xpath query?

you should try //item[position() <= 10]/pubDateas you want the 10th item!

View Article

how to write this xpath query?

I'm cosuming rss from several sites and my real problem is with their Pubdate field because most of their PubDate values are not valid somehow I manage to retrieve the value from the PubDate fieldset...

View Article
Browsing all 4 articles
Browse latest View live




Latest Images