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.
精彩评论