Mikijs Posted June 4, 2009 Report Share Posted June 4, 2009 Sveiki, varbūt spēsiet palīdzēt saprast kas īsti neiet, strādāju uz servera kurš nerāda kļūdas paziņojumus, arī ja pats uzlieku E_ALL... <?php echo '<table>'; $bank="http://www.bank.lv/vk/xml.xml"; $objDOM = new DOMDocument(); $objDOM->load($bank); $cur = $objDOM->getElementsByTagName("Currency"); foreach($cur as $items) { $ID = $items->getElementsByTagName("ID"); $ID = $ID->item(0)->nodeValue; $units = $items->getElementsByTagName("Units"); $units = $units->item(0).nodeValue; $rate = $items->getElementsByTagName("Rate"); $rate = $rate->item(0).nodeValue; echo "<tr><td class='cur-id'>$ID</td><td class='cur-rate'>$rate</td></tr>"; } echo '</table>'; ?> Quote Link to comment Share on other sites More sharing options...
bubu Posted June 4, 2009 Report Share Posted June 4, 2009 Lai rādītos kļūdas paziņojumi ir jāuztāda display_errors ini flags: ini_set("display_errors", true); Kas tā par item(0).nodeValue sintaksi ar punktu? Quote Link to comment Share on other sites More sharing options...
marcis Posted June 4, 2009 Report Share Posted June 4, 2009 Vai tik xml'am nebija domāts SimpleXML? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.