DOM - parse HTML document
| From: | Leonidas Safran | Date: | Mon, 11 Sep 2006 21:11:41 +0000 |
| Subject: | DOM - parse HTML document | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-241629@lists.php.net to get a copy of this message | ||
Hello all,
I don't really get it to work with that functions from http://www.php.net/manual/en/ref.dom.php
I try to get the content of <td> fields on an external html page, where I just know some ids
of the rows.
Example:
...
<tr id = 'tr01'>
<td>1</td><td>2</td><td>3</td><td>4</td>
</tr>
<tr id = 'tr02'>
<td>1</td><td>2</td><td>3</td><td>4</td>
</tr>
<tr id = 'tr01'>
<td>1</td><td>2</td><td>3</td><td>4</td>
</tr>
<tr id = 'tr02'>
<td>1</td><td>2</td><td>3</td><td>4</td>
</tr>
...
PS: Please note, that id is written more than once. So
DomDocument->getElementById('tr01') returns only one element and not two or more...
I can't find out how to grab the data in the td fields... I don't find examples to look
at... :-(
I'd be really glad if somebody could give me some advice or tutorial websites about that...
Thanks a lot
LS
--
"Feel free" – 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail