web scraping - PHP Simple HTML DOM Parser find elements with multiple attributes -


i'm using simple html dom parser can't figure out how following :

imagine have :

<td style"color:#e05206" width"22" height="58">ok</td> <td style"color:#e05206" width"22" height="58" align="center">not ok</td> <td style"color:#ffffff" width"22" height="58">not ok</td> 

i want ok.

i tried :

$results = $html->find('td[style*=color:#e05206], td[width*="22"], td[height*=58], td[!align]'); 

i thought right answer, not, because applies or , not and.

i want ok , not elements. summarize td has v , x , y , not z. possible ?

thanks answers !

update : not searching ok, else. searching td has attribute v=something , x=something , y=something , not z.

var okelement = new array(); $("table tr").find("td").each(function(){    tdvalue = $(this).text();    if(tdvalue == "ok"){       okelement.push($(this).css('color')    } });  explanation : here looping td dom elements , checking ok value.     each loop indicates current td elements , getting td value , checking whether text value ok or not if ok value pushing td elemtnt color style array...     array contains #e05206 contains ok text.           #e05206 in okelement array can manipulate tds wish     example  

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -