开发者

why can't i get All text within this xpath in this page?

here is the url and xpath . url : http://product.dangdang.com/product.aspx?product_id=21026883&ref=book-01-E1 xpath: //span[@class='detail_all']

doc.SelectSingleNode(xpath).innertext just can't get ALL innertext with this xpath !

why ?

how开发者_运维问答 can i fix this ?

thx !


You cannot use SelectSingleNode, as it will only return the first span or node if you want.

You have to iterate over doc.SelectNodes and concatenate your results.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜