c# - Parse an Img URL using HtmlNode -
i trying grab img url maintain getting stuck inner or outterhtml still kinda mess. grabbing with
htmlnode htmltable = mydoc.documentnode.selectsinglenode("(//*[@id='mw-content-text']/figure[1]/a/img)"); that still leaves me <img alt =\"blah\"src=\"http://imageiwant.png\">" string there easy way parse out , have http://imageiwant.png
the htmlnode has attributes namevalue collection can cycle through , src attribute , give url of image.
htmltable.attributes['src'] give image url.
c# html parsing xpath nodes
No comments:
Post a Comment