Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> simplexml - invalid xmlChar value
Regss
post 1.04.2011, 16:59:41
Post #1





Grupa: Zarejestrowani
Postów: 60
Pomógł: 0
Dołączył: 7.05.2006

Ostrzeżenie: (0%)
-----


Witam.
Zaczynam zabawę z simplexml. Oto mój prosty skrypt:

  1. <?php
  2. $z_xml = simplexml_load_file('videodb.xml');
  3. foreach ($z_xml->movie as $z_movie)
  4. {
  5. echo "$z_movie->title - $z_movie->fileinfo - $z_movie->studio - ";
  6. foreach ($z_movie->fileinfo as $z_fileinfo)
  7. {
  8. foreach ($z_fileinfo->streamdetails as $z_streamdetails)
  9. {
  10. foreach ($z_streamdetails->video as $z_video)
  11. {
  12. echo "$z_video->codec<br>";
  13. }
  14. }
  15. }
  16. }
  17. ?>


Otrzymuje błąd:
  1. Warning: simplexml_load_file() [function.simplexml-load-file]: videodb.xml:69293: parser error : xmlParseCharRef: invalid xmlChar value 11 in D:\Programy\VertrigoServ\www\xml\index.php on line 3
  2.  
  3. Warning: simplexml_load_file() [function.simplexml-load-file]: y przeżyli, zmienia w potwory. Robert Neville jest ostatnim człowiekiem &#x0B; in D:\Programy\VertrigoServ\www\xml\index.php on line 3
  4.  
  5. Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in D:\Programy\VertrigoServ\www\xml\index.php on line 3
  6.  
  7. Warning: Invalid argument supplied for foreach() in D:\Programy\VertrigoServ\www\xml\index.php on line 4


Jak prosto pominąć nieobsługiwane znaki?
Pozdrawiam.
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 14.08.2025 - 13:52