Plik xml wygląda tak i generuję go w php wysyłając odpowiedni header dla xml

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Catalog data="2012-02-11 23:27:56" name="current cumulation" lang="en">
  3. <Cumulation>
  4. <amount country_name="Poland">
  5. dane1
  6. </amount>
  7. <amount country_name="Europe">
  8. dane2
  9. </amount>
  10. </Cumulation>
  11. </Catalog>
  12.  




  1. <!DOCTYPE html>
  2. <script src="http://code.jquery.com/jquery-latest.js"></script>
  3.  
  4.  
  5. </head>
  6.  
  7.  
  8. <div id="kontener" style="background-color:blue; width:300px; height:100px"></div>
  9.  
  10.  
  11.  
  12. var xmlDoc = document.implementation.createDocument("","",null);
  13. xmlDoc.load('http://domena.pl/dane.xml');
  14.  
  15. $(xmlDoc).find("amount").each(
  16. function() {
  17. $("#kontener").append("dane: " + $(this).attr("country_name")+ "<br>");
  18. });
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29. </body>
  30. </html>


Czemu nie mogę odczytać nazwy kraju ?