views:

1640

answers:

2

I'm trying to retrieve a specific image from a html document, using html agility pack and this xpath:

//div[@id='topslot']/a/img/@src

As far as I can see, it finds the src-attribute, but it returns the img-tag. Why is that?

I would expect the InnerHtml/InnerText or something to be set, but both are empty strings. OuterHtml is set to the complete img-tag.

Are there any documentation for Html Agility Pack?

+2  A: 

Html Agility Pack does not support attribute selection.

Azat Razetdinov
+1  A: 

Html Agility Pack will support it soon.

http://htmlagilitypack.codeplex.com/Thread/View.aspx?ThreadId=204342

Almas