Re: DOM - parse HTML document [solved]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello all,

I have found a way...

$doc = new DomDocument();
$doc->loadHTMLFile($source["url"]);

$elements = $doc->getElementsByTagName("tr");

$i = 0;

while( $elements->item($i) ){
if( $elements->item($i)->hasAttributes() && preg_match("/td[0|1]/",$elements->item($i)->getAttribute("id")) > 0 ){
  echo $elements->item($i)->nodeValue . "<br />";
  }
  $i++;
}

Works like i want...


Regards,

LS
-- 
"Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux