PHP DOM Xpath get image -


i'm trying image php dom , xpath, image has no unique identifier can use fetch it. need 1 image.

the markup follows:

<img alt="photo of starbucks raffles city" style="position: relative; left: 0px; top: -11px;" id="hero_photo" class="flexibleimage" src="http://media-cdn.tripadvisor.com/media/photo-s/02/39/57/0d/front-of-starbucks.jpg" width="256" height="171"> 

if fetch on class or id doesn't because more images have these classes, there anyway fetch on 3 properties @ same time? example want find //img id a, class b , width c. that?

"for example want find //img id a, class b , width c"

you can combine multiple criteria using and operator. example, xpath above statement :

//img[@id='a' , @class='b' , @width='c'] 

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -