OK
so it showing the info but stops continuing futher!!!!! and shows the error message!!!!!
--------------------------------------------------------------------------
this is the browser output:

29/11/2008
28/02/2009
29/05/2009
29/08/2009

Fatal error: Call to a member function getAttribute() on a non-object in C:\xampplite\htdocs\dwax\billpayment.php
$date = $d->getElementsByTagName('date')->item($num)->getAttribute('dt');

--------------------------------------------------------------------------

here is my XML CODE:
<customers>
<customer id="000">
<name>
<title/>
<firstName>Bart</firstName>
<middleName/>
<lastName>Simpson</lastName>
</name>
<dates>
<date dt="29/11/2008">
<reading>62990</reading>
<amtDue>0.00</amtDue>
<payDate>new acc</payDate>
<amtPaid> </amtPaid>
</date>
<date dt="28/02/2009">
<reading>64492</reading>
<amtDue>242.21</amtDue>
<payDate>30/03/2009</payDate>
<amtPaid>242.21</amtPaid>
</date>
<date dt="29/05/2009">
<reading>65374</reading>
<amtDue>157.23</amtDue>
<payDate>24/06/2009</payDate>
<amtPaid>157.23</amtPaid>
</date>
<date dt="29/08/2009">
<reading>66348</reading>
<amtDue>170.60</amtDue>
<payDate>19/09/2009</payDate>
<amtPaid>170.60</amtPaid>
</date>
</dates>
</customer>
</customers>
PHP Code:
<?php if (array_key_exists('search'$_POST)) {   
        
$target $_POST['target'];  
        if(!
$target == ""){ 
                
$count 0
        
$file "files/customers.xml";  
                   
                          
$doc = new DOMDocument(); 
                          
$doc->load($file) or die('Unable to load file'); 
                           
                          
$node $doc->getElementsByTagName('customer'); 
                          foreach( 
$node as $find ){ 
                          
$id $find->getAttribute('id'); 
                          
                                          if (
$target == $id){ 
                                                
$num 0
                                                
$d $doc->getElementsByTagName('dates')->item($count); 
                                                while (
$d){ 
                                                   
$date $d->getElementsByTagName('date')->item($num)->getAttribute('dt'); 
                                                   echo 
$date."<br />"
                                                   
$num++;  
                                                   ; 
                                                } 
                                                 
                                          } 
                                
$count++; 
                          } 
        } 

// ...... 
?> 
<form name="search" method="post" action="">  
<h3>Bill Payment</h3> 
<p>Customer ID: <input type="text" name="target" size="20" /></p> 
<input type="submit" value="Go" name="search" /><input type="hidden" name="search" value="1"/> 
</form></p>  
<p><span style="color:red;"><?php echo $error?></span></p>