- libxml_use_internal_errors: documentation ( source)
<table border="1">
<tr>
<th>Marca</th>
<th>Modelo</th>
</tr>
<?php
libxml_use_internal_errors(true);
$html = new DOMDocument();
$url = "http://pt.bca-europe.com/SearchVehicle/SearchVehicleResults/?searchToken=null¤tPage=1&pageSize=200&sortOrder=TimeRemaining&saleId=00000000-0000-0000-0000-000000000000&saleCal=False&levelOfDetail=Detail&_=1385046541960#";
$html->loadHtmlFile($url);
$xpath = new DOMXPath($html);
$marcas = $xpath->query("//div[@id='VehicleResults']/div[@class='AspNet-GridView']/table/tbody/tr/td[@class='ConcatenatedField4']/span");
foreach($marcas as $marca) {
$make = $xpath->query("./span[@class='Value Make']", $marca)->item(0)->textContent;
$model = $xpath->query("./span[@class='Value Model']", $marca)->item(0)->textContent;
echo "<tr><td>$make</td><td>$model</td></tr>\n";
}
?>
</table>