Hello I am having a problem with DomDocument. I need to do an script which extracts all the information from the tables with certain id.

So I did:

```
$link = "WEBSITE URL";

$html = file_get_contents($link);
$doc = new DOMDocument();
$doc->loadHTML($html);
$xpath = new DOMXPath($doc);
$context_nodes = $xpath->query('//table[@id="news"]/tr[position()>0]/td');

```

So I get all the `<td>`s and information, but the problem is that the `<img>` tags haven't been extracted by the script. How can I extract all the information of the tables either text or image html tags?

The html code from which I want to extract the info is:

```
<table id="news" width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
        <td width="539" height="35"><span><strong>Info to Extract</strong></span></td>
    </tr>
    <tr>
        <td height="35" class="texto10">Martes, 02 de Octubre de 2012  | Autor: Trovert"  rel="author"></a></td>
    </tr>
    <tr>
        <td height="35" class="texto12Gris"><p><strong>Info To extract</strong></p>
            <p><strong>&nbsp;</strong></p>
            <p><strong>Casa de Gobierno: (a 9 cuadras del hostel)</strong></p>
            <img title="title" src="../images/theimage.jpg" width="400" height="266" />
        </td>
    </tr>
</table>

```

This is how I am iterating the extracted elements:

```
foreach ($context_nodes as $node) {
    echo $node->nodeValue . '<br/>';
}

```

Thanks